summaryrefslogtreecommitdiff
path: root/sequencer.c
diff options
context:
space:
mode:
authorJohannes Schindelin <johannes.schindelin@gmx.de>2017-01-02 16:35:39 +0100
committerJunio C Hamano <gitster@pobox.com>2017-01-17 14:06:01 -0800
commit62fdb6529a5b744e544ec3d776ba1adf48dab751 (patch)
tree1fb9f953703ec9feeccc7b682ccdc566607683b4 /sequencer.c
parent9a757c4970837162dfe4a64b70a428209c135641 (diff)
downloadgit-62fdb6529a5b744e544ec3d776ba1adf48dab751.tar.gz
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>
Diffstat (limited to 'sequencer.c')
-rw-r--r--sequencer.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sequencer.c b/sequencer.c
index 84534ee057..27dc91cc95 100644
--- a/sequencer.c
+++ b/sequencer.c
@@ -433,6 +433,8 @@ static int do_recursive_merge(struct commit *base, struct commit *next,
o.ancestor = base ? base_label : "(empty tree)";
o.branch1 = "HEAD";
o.branch2 = next ? next_label : "(empty tree)";
+ if (is_rebase_i(opts))
+ o.buffer_output = 2;
head_tree = parse_tree_indirect(head);
next_tree = next ? next->tree : empty_tree();
@@ -444,6 +446,8 @@ static int do_recursive_merge(struct commit *base, struct commit *next,
clean = merge_trees(&o,
head_tree,
next_tree, base_tree, &result);
+ if (is_rebase_i(opts) && clean <= 0)
+ fputs(o.obuf.buf, stdout);
strbuf_release(&o.obuf);
if (clean < 0)
return clean;