Skip to contentSkip to conversation

rebase: fix stderr redirect in apply_autostash()

PATCH New Todd Zullinger 1 participant 1 message Nov 13, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 rebase: fix stderr redirect in apply_autostash()

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.

---
 git-rebase.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
git-rebase.sh +1 -1
index 6344e8d5e3..aabbf6b69e 100755
@@ -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
Signature · 1 line
2.15.0