]> asedeno.scripts.mit.edu Git - git.git/blobdiff - revision.c
rebase -i: remember the settings of -v, -s and -p when interrupted
[git.git] / revision.c
index b12c25e2b0c8e2c1d3bb097739f3c132a296c964..5184716bf0af35298d2a1bd3b9411b518be09e14 100644 (file)
@@ -667,7 +667,6 @@ void init_revisions(struct rev_info *revs, const char *prefix)
        revs->min_age = -1;
        revs->skip_count = -1;
        revs->max_count = -1;
-       revs->subject_prefix = "PATCH";
 
        revs->prune_fn = NULL;
        revs->prune_data = NULL;
@@ -1180,7 +1179,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 +1229,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);
        }