Code

Move the pick_author code to git-sh-setup
[git.git] / revision.c
index b12c25e2b0c8e2c1d3bb097739f3c132a296c964..7834bb108e27a819a4a619a85123443f254d421d 100644 (file)
@@ -1180,7 +1180,8 @@ int setup_revisions(int argc, const char **argv, struct rev_info *revs, const ch
 
                        opts = diff_opt_parse(&revs->diffopt, argv+i, argc-i);
                        if (opts > 0) {
-                               revs->diff = 1;
+                               if (strcmp(argv[i], "-z"))
+                                       revs->diff = 1;
                                i += opts - 1;
                                continue;
                        }
@@ -1229,7 +1230,9 @@ int setup_revisions(int argc, const char **argv, struct rev_info *revs, const ch
 
        if (revs->prune_data) {
                diff_tree_setup_paths(revs->prune_data, &revs->pruning);
-               revs->prune_fn = try_to_simplify_commit;
+               /* Can't prune commits with rename following: the paths change.. */
+               if (!revs->diffopt.follow_renames)
+                       revs->prune_fn = try_to_simplify_commit;
                if (!revs->full_diff)
                        diff_tree_setup_paths(revs->prune_data, &revs->diffopt);
        }