Skip to content

Commit 5a2c1c0

Browse files
FStelzergitster
authored andcommitted
t/fmt-merge-msg: do not redirect stderr
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent abe6bb3 commit 5a2c1c0

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

t/t6200-fmt-merge-msg.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ test_expect_success 'message for merging local branch' '
104104
test_expect_success GPG 'message for merging local tag signed by good key' '
105105
git checkout main &&
106106
git fetch . signed-good-tag &&
107-
git fmt-merge-msg <.git/FETCH_HEAD >actual 2>&1 &&
107+
git fmt-merge-msg <.git/FETCH_HEAD >actual &&
108108
grep "^Merge tag ${apos}signed-good-tag${apos}" actual &&
109109
grep "^# gpg: Signature made" actual &&
110110
grep "^# gpg: Good signature from" actual
@@ -113,7 +113,7 @@ test_expect_success GPG 'message for merging local tag signed by good key' '
113113
test_expect_success GPG 'message for merging local tag signed by unknown key' '
114114
git checkout main &&
115115
git fetch . signed-good-tag &&
116-
GNUPGHOME=. git fmt-merge-msg <.git/FETCH_HEAD >actual 2>&1 &&
116+
GNUPGHOME=. git fmt-merge-msg <.git/FETCH_HEAD >actual &&
117117
grep "^Merge tag ${apos}signed-good-tag${apos}" actual &&
118118
grep "^# gpg: Signature made" actual &&
119119
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
123123
test_config gpg.ssh.allowedSignersFile "${GPGSSH_ALLOWED_SIGNERS}" &&
124124
git checkout main &&
125125
git fetch . signed-good-ssh-tag &&
126-
git fmt-merge-msg <.git/FETCH_HEAD >actual 2>&1 &&
126+
git fmt-merge-msg <.git/FETCH_HEAD >actual &&
127127
grep "${GPGSSH_GOOD_SIGNATURE_TRUSTED}" actual &&
128128
! grep "${GPGSSH_BAD_SIGNATURE}" actual
129129
'
@@ -132,7 +132,7 @@ test_expect_success GPGSSH 'message for merging local tag signed by unknown ssh
132132
test_config gpg.ssh.allowedSignersFile "${GPGSSH_ALLOWED_SIGNERS}" &&
133133
git checkout main &&
134134
git fetch . signed-untrusted-ssh-tag &&
135-
git fmt-merge-msg <.git/FETCH_HEAD >actual 2>&1 &&
135+
git fmt-merge-msg <.git/FETCH_HEAD >actual &&
136136
grep "${GPGSSH_GOOD_SIGNATURE_UNTRUSTED}" actual &&
137137
! grep "${GPGSSH_BAD_SIGNATURE}" actual &&
138138
grep "${GPGSSH_KEY_NOT_TRUSTED}" actual

0 commit comments

Comments
 (0)