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

[PATCH] rebase: fix stderr redirect in apply_autostash()

From
Todd Zullinger <tmz@pobox.com>
Date
Nov 13, 2017, 21:20 UTC
Message-ID
<20171113212009.26835-1-tmz@pobox.com>

The intention is to ignore all output from the 'git stash apply' call. Adjust the order of the redirection to ensure that both stdout and stderr are redirected to /dev/null.

Signed-off-by: Todd Zullinger <tmz@pobox.com>
---
 git-rebase.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/git-rebase.sh b/git-rebase.sh
index 6344e8d5e3..aabbf6b69e 100755
--- a/git-rebase.sh
+++ b/git-rebase.sh
@@ -166,7 +166,7 @@ apply_autostash () {
 	if test -f "$state_dir/autostash"
 	then
 		stash_sha1=$(cat "$state_dir/autostash")
-		if git stash apply $stash_sha1 2>&1 >/dev/null
+		if git stash apply $stash_sha1 >/dev/null 2>&1
 		then
 			echo "$(gettext 'Applied autostash.')" >&2
 		else
-- 
2.15.0
Message 1 of 1 in “rebase: fix stderr redirect in apply_autostash()”
  1. rebase: fix stderr redirect in apply_autostash()Todd Zullinger, Nov 13, 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.