Skip to content

Commit 5a24b4e

Browse files
committed
Merge branch 'js/t5534-rev-parse-gives-multi-line-output-fix' into maint
A few tests that tried to verify the contents of push certificates did not use 'git rev-parse' to formulate the line to look for in the certificate correctly. * js/t5534-rev-parse-gives-multi-line-output-fix: t5534: fix misleading grep invocation
2 parents 362009f + 8722947 commit 5a24b4e

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

t/t5534-push-signed.sh

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -119,8 +119,11 @@ test_expect_success GPG 'signed push sends push certificate' '
119119
sed -n -e "s/^nonce /NONCE=/p" -e "/^$/q" dst/push-cert
120120
) >expect &&
121121
122-
grep "$(git rev-parse noop ff) refs/heads/ff" dst/push-cert &&
123-
grep "$(git rev-parse noop noff) refs/heads/noff" dst/push-cert &&
122+
noop=$(git rev-parse noop) &&
123+
ff=$(git rev-parse ff) &&
124+
noff=$(git rev-parse noff) &&
125+
grep "$noop $ff refs/heads/ff" dst/push-cert &&
126+
grep "$noop $noff refs/heads/noff" dst/push-cert &&
124127
test_cmp expect dst/push-cert-status
125128
'
126129

@@ -200,8 +203,11 @@ test_expect_success GPG 'fail without key and heed user.signingkey' '
200203
sed -n -e "s/^nonce /NONCE=/p" -e "/^$/q" dst/push-cert
201204
) >expect &&
202205
203-
grep "$(git rev-parse noop ff) refs/heads/ff" dst/push-cert &&
204-
grep "$(git rev-parse noop noff) refs/heads/noff" dst/push-cert &&
206+
noop=$(git rev-parse noop) &&
207+
ff=$(git rev-parse ff) &&
208+
noff=$(git rev-parse noff) &&
209+
grep "$noop $ff refs/heads/ff" dst/push-cert &&
210+
grep "$noop $noff refs/heads/noff" dst/push-cert &&
205211
test_cmp expect dst/push-cert-status
206212
'
207213

0 commit comments

Comments
 (0)