From 4c180f60a47f250b7c75151f8536ba56c7f1a8e2 Mon Sep 17 00:00:00 2001 From: Todd Zullinger Date: Mon, 13 Nov 2017 16:07:45 -0500 Subject: t/lib-gpg: fix gpgconf stderr redirect to /dev/null In 29ff1f8f74 (t: lib-gpg: flush gpg agent on startup, 2017-07-20), a call to gpgconf was added to kill the gpg-agent. The intention was to ignore all output from the call, but the order of the redirection needs to be switched to ensure that both stdout and stderr are redirected to /dev/null. Without this, gpgconf from gnupg-2.0 releases would output 'gpgconf: invalid option "--kill"' each time it was called. Signed-off-by: Todd Zullinger Signed-off-by: Junio C Hamano --- t/lib-gpg.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/t/lib-gpg.sh b/t/lib-gpg.sh index 43679a4c64..a5d3b2cbaa 100755 --- a/t/lib-gpg.sh +++ b/t/lib-gpg.sh @@ -31,7 +31,7 @@ then chmod 0700 ./gpghome && GNUPGHOME="$(pwd)/gpghome" && export GNUPGHOME && - (gpgconf --kill gpg-agent 2>&1 >/dev/null || : ) && + (gpgconf --kill gpg-agent >/dev/null 2>&1 || : ) && gpg --homedir "${GNUPGHOME}" 2>/dev/null --import \ "$TEST_DIRECTORY"/lib-gpg/keyring.gpg && gpg --homedir "${GNUPGHOME}" 2>/dev/null --import-ownertrust \ -- cgit v1.2.1 From eadf1c8f454aff0b77202815af7b250320a5f5bf Mon Sep 17 00:00:00 2001 From: Todd Zullinger Date: Mon, 13 Nov 2017 16:20:09 -0500 Subject: 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. Signed-off-by: Todd Zullinger Signed-off-by: Junio C Hamano --- git-rebase.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git-rebase.sh b/git-rebase.sh index 2cf73b88e8..56013702cd 100755 --- a/git-rebase.sh +++ b/git-rebase.sh @@ -164,7 +164,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 -- cgit v1.2.1