From c5a8319f0378d93be5aea05b833bb5e23c9f0b3d Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Fri, 16 Jun 2017 15:34:50 +0200 Subject: [PATCH 1/4] sequencer: print autostash messages to stderr The rebase messages are printed to stderr traditionally. It was a bug introduced in 587947750bd (rebase: implement --[no-]autostash and rebase.autostash, 2013-05-12) and that bug has been faithfully copied when reimplementing parts of the interactive rebase in the sequencer. It is time to fix that: let's print the autostash messages to stderr instead of stdout. Signed-off-by: Johannes Schindelin --- sequencer.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/sequencer.c b/sequencer.c index a59408a23a2..8713cc8d1d5 100644 --- a/sequencer.c +++ b/sequencer.c @@ -1923,7 +1923,7 @@ static int apply_autostash(struct replay_opts *opts) argv_array_push(&child.args, "apply"); argv_array_push(&child.args, stash_sha1.buf); if (!run_command(&child)) - printf(_("Applied autostash.\n")); + fprintf(stderr, _("Applied autostash.\n")); else { struct child_process store = CHILD_PROCESS_INIT; @@ -1937,10 +1937,11 @@ static int apply_autostash(struct replay_opts *opts) if (run_command(&store)) ret = error(_("cannot store %s"), stash_sha1.buf); else - printf(_("Applying autostash resulted in conflicts.\n" - "Your changes are safe in the stash.\n" - "You can run \"git stash pop\" or" - " \"git stash drop\" at any time.\n")); + fprintf(stderr, + _("Applying autostash resulted in conflicts.\n" + "Your changes are safe in the stash.\n" + "You can run \"git stash pop\" or" + " \"git stash drop\" at any time.\n")); } strbuf_release(&stash_sha1); -- 2.12.2.windows.1