]> git.ipfire.org Git - thirdparty/git.git/commitdiff
t/fmt-merge-msg: do not redirect stderr
authorFabian Stelzer <fs@gigacodes.de>
Thu, 9 Dec 2021 08:52:41 +0000 (09:52 +0100)
committerJunio C Hamano <gitster@pobox.com>
Thu, 9 Dec 2021 21:38:03 +0000 (13:38 -0800)
All the GPG and GPGSSH tests are redirecing stdout as well as stderr
to `actual` and grep for success/failure over the resulting file.
However, no output is printed on stderr and we do not need to
include it in the grep.

Signed-off-by: Fabian Stelzer <fs@gigacodes.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t6200-fmt-merge-msg.sh

index 06c5fb56157f28359b47c04818e2a51f9098ee36..cc68bba064b3cbd5396eaa1aac253fff2fcb6437 100755 (executable)
@@ -104,7 +104,7 @@ test_expect_success 'message for merging local branch' '
 test_expect_success GPG 'message for merging local tag signed by good key' '
        git checkout main &&
        git fetch . signed-good-tag &&
-       git fmt-merge-msg <.git/FETCH_HEAD >actual 2>&1 &&
+       git fmt-merge-msg <.git/FETCH_HEAD >actual &&
        grep "^Merge tag ${apos}signed-good-tag${apos}" actual &&
        grep "^# gpg: Signature made" actual &&
        grep "^# gpg: Good signature from" actual
@@ -113,7 +113,7 @@ test_expect_success GPG 'message for merging local tag signed by good key' '
 test_expect_success GPG 'message for merging local tag signed by unknown key' '
        git checkout main &&
        git fetch . signed-good-tag &&
-       GNUPGHOME=. git fmt-merge-msg <.git/FETCH_HEAD >actual 2>&1 &&
+       GNUPGHOME=. git fmt-merge-msg <.git/FETCH_HEAD >actual &&
        grep "^Merge tag ${apos}signed-good-tag${apos}" actual &&
        grep "^# gpg: Signature made" actual &&
        grep -E "^# gpg: Can${apos}t check signature: (public key not found|No public key)" actual
@@ -123,7 +123,7 @@ test_expect_success GPGSSH 'message for merging local tag signed by good ssh key
        test_config gpg.ssh.allowedSignersFile "${GPGSSH_ALLOWED_SIGNERS}" &&
        git checkout main &&
        git fetch . signed-good-ssh-tag &&
-       git fmt-merge-msg <.git/FETCH_HEAD >actual 2>&1 &&
+       git fmt-merge-msg <.git/FETCH_HEAD >actual &&
        grep "${GPGSSH_GOOD_SIGNATURE_TRUSTED}" actual &&
        ! grep "${GPGSSH_BAD_SIGNATURE}" actual
 '
@@ -132,7 +132,7 @@ test_expect_success GPGSSH 'message for merging local tag signed by unknown ssh
        test_config gpg.ssh.allowedSignersFile "${GPGSSH_ALLOWED_SIGNERS}" &&
        git checkout main &&
        git fetch . signed-untrusted-ssh-tag &&
-       git fmt-merge-msg <.git/FETCH_HEAD >actual 2>&1 &&
+       git fmt-merge-msg <.git/FETCH_HEAD >actual &&
        grep "${GPGSSH_GOOD_SIGNATURE_UNTRUSTED}" actual &&
        ! grep "${GPGSSH_BAD_SIGNATURE}" actual &&
        grep "${GPGSSH_KEY_NOT_TRUSTED}" actual