diff options
-rw-r--r-- | sequencer.c | 8 | ||||
-rwxr-xr-x | t/t3421-rebase-topology-linear.sh | 2 |
2 files changed, 7 insertions, 3 deletions
diff --git a/sequencer.c b/sequencer.c index 4d3f60594c..1a10766492 100644 --- a/sequencer.c +++ b/sequencer.c @@ -2470,7 +2470,7 @@ int sequencer_make_script(FILE *out, int argc, const char **argv, init_revisions(&revs, NULL); revs.verbose_header = 1; revs.max_parents = 1; - revs.cherry_pick = 1; + revs.cherry_mark = 1; revs.limited = 1; revs.reverse = 1; revs.right_only = 1; @@ -2495,8 +2495,12 @@ int sequencer_make_script(FILE *out, int argc, const char **argv, return error(_("make_script: error preparing revisions")); while ((commit = get_revision(&revs))) { + int is_empty = is_original_commit_empty(commit); + + if (!is_empty && (commit->object.flags & PATCHSAME)) + continue; strbuf_reset(&buf); - if (!keep_empty && is_original_commit_empty(commit)) + if (!keep_empty && is_empty) strbuf_addf(&buf, "%c ", comment_line_char); strbuf_addf(&buf, "%s %s ", insn, oid_to_hex(&commit->object.oid)); diff --git a/t/t3421-rebase-topology-linear.sh b/t/t3421-rebase-topology-linear.sh index 68fe2003ef..52fc6885e5 100755 --- a/t/t3421-rebase-topology-linear.sh +++ b/t/t3421-rebase-topology-linear.sh @@ -215,7 +215,7 @@ test_run_rebase () { } test_run_rebase success '' test_run_rebase failure -m -test_run_rebase failure -i +test_run_rebase success -i test_run_rebase failure -p # m |