sequencer (rebase -i): show only failed cherry-picks' output
This is the behavior of the shell script version of the interactive rebase, by using the `output` function defined in `git-rebase.sh`. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Johannes Schindelin committed
Jan 2, 2017 at 16:35 UTC
62fdb6529a5b744e544ec3d776ba1adf48dab751
1 file changed
+4
sequencer.c
+4
@@ -433,6 +433,8 @@ static int do_recursive_merge(struct commit *base, struct commit *next,
433
o.ancestor = base ? base_label : "(empty tree)";
434
o.branch1 = "HEAD";
435
o.branch2 = next ? next_label : "(empty tree)";
436
+ if (is_rebase_i(opts))
437
+ o.buffer_output = 2;
438
439
head_tree = parse_tree_indirect(head);
440
next_tree = next ? next->tree : empty_tree();
@@ -444,6 +446,8 @@ static int do_recursive_merge(struct commit *base, struct commit *next,
446
clean = merge_trees(&o,
447
head_tree,
448
next_tree, base_tree, &result);
449
+ if (is_rebase_i(opts) && clean <= 0)
450
+ fputs(o.obuf.buf, stdout);
451
strbuf_release(&o.obuf);
452
if (clean < 0)
453
return clean;