rebase -i: silence stash apply
authorPhillip Wood <phillip.wood@dunelm.org.uk>
Thu, 18 May 2017 10:02:33 +0000 (11:02 +0100)
committerJunio C Hamano <gitster@pobox.com>
Sat, 20 May 2017 09:24:28 +0000 (18:24 +0900)
The shell version of rebase -i silences the status output from 'git
stash apply' when restoring the autostashed changes. The C version
does not.

Having the output from git stash apply on the screen is
distracting as it makes it difficult to find the message from git
rebase saying that the rebase succeeded. Also the status information
that git stash prints talks about looking in .git/rebase-merge/done to
see which commits have been applied. As .git/rebase-merge is removed
shortly after the message is printed before rebase -i exits this is
confusing.

Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk>
Acked-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
sequencer.c
index 907319d08945dc54d2fe710f0d8f5e9213b4bb35..245624682239daa79a7a5d65913b319532a33671 100644 (file)
@@ -1898,6 +1898,8 @@ static int apply_autostash(struct replay_opts *opts)
        strbuf_trim(&stash_sha1);
 
        child.git_cmd = 1;
+       child.no_stdout = 1;
+       child.no_stderr = 1;
        argv_array_push(&child.args, "stash");
        argv_array_push(&child.args, "apply");
        argv_array_push(&child.args, stash_sha1.buf);