git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 2/2] rebase -i: silence stash apply

From
PWPhillip Wood <phillip.wood@talktalk.net>
Date
May 18, 2017, 10:02 UTC
Message-ID
<20170518100233.30559-3-phillip.wood@talktalk.net>
In-Reply-To
<20170518100233.30559-1-phillip.wood@talktalk.net>
From: Phillip Wood <phillip.wood@dunelm.org.uk>

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>
---
 sequencer.c | 2 ++
 1 file changed, 2 insertions(+)
diff --git a/sequencer.c b/sequencer.c
index f8bc18badf1a3fb1b39656501c5a316e229968d2..311728a145dfc66e230334221a2610468239932d 100644
--- a/sequencer.c
+++ b/sequencer.c
@@ -1914,6 +1914,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);
-- 
2.13.0
Previous: Phillip WoodNext: Johannes Schindelin
Message 3 of 6 in “Fix a couple of minor rebase -i regressions”
  1. 0/2 Fix a couple of minor rebase -i regressionsPhillip Wood, May 18, 2017
  2. 1/2 rebase -i: fix reflog messagePhillip Wood, May 18, 2017
  3. 2/2 rebase -i: silence stash applyPhillip Wood, May 18, 2017
  4. Johannes SchindelinMay 18, 2017
  5. Phillip WoodMay 18, 2017
  6. Johannes SchindelinMay 18, 2017

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.