summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2017-07-10 13:59:07 -0700
committerJunio C Hamano <gitster@pobox.com>2017-07-10 13:59:07 -0700
commit5a24b4e14a7120879213aad9a13b1914e5756820 (patch)
tree88d206f758fcbf18040e0129c94866a595138bfc
parent362009f8cff3a592194bc1aa204580a7578078a6 (diff)
parent8722947e5c5597222a37f1fa21079084e6c03769 (diff)
downloadgit-5a24b4e14a7120879213aad9a13b1914e5756820.tar.gz
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
-rwxr-xr-xt/t5534-push-signed.sh14
1 files changed, 10 insertions, 4 deletions
diff --git a/t/t5534-push-signed.sh b/t/t5534-push-signed.sh
index 5bcb288f5c..464ffdd147 100755
--- a/t/t5534-push-signed.sh
+++ b/t/t5534-push-signed.sh
@@ -119,8 +119,11 @@ test_expect_success GPG 'signed push sends push certificate' '
sed -n -e "s/^nonce /NONCE=/p" -e "/^$/q" dst/push-cert
) >expect &&
- grep "$(git rev-parse noop ff) refs/heads/ff" dst/push-cert &&
- grep "$(git rev-parse noop noff) refs/heads/noff" dst/push-cert &&
+ noop=$(git rev-parse noop) &&
+ ff=$(git rev-parse ff) &&
+ noff=$(git rev-parse noff) &&
+ grep "$noop $ff refs/heads/ff" dst/push-cert &&
+ grep "$noop $noff refs/heads/noff" dst/push-cert &&
test_cmp expect dst/push-cert-status
'
@@ -200,8 +203,11 @@ test_expect_success GPG 'fail without key and heed user.signingkey' '
sed -n -e "s/^nonce /NONCE=/p" -e "/^$/q" dst/push-cert
) >expect &&
- grep "$(git rev-parse noop ff) refs/heads/ff" dst/push-cert &&
- grep "$(git rev-parse noop noff) refs/heads/noff" dst/push-cert &&
+ noop=$(git rev-parse noop) &&
+ ff=$(git rev-parse ff) &&
+ noff=$(git rev-parse noff) &&
+ grep "$noop $ff refs/heads/ff" dst/push-cert &&
+ grep "$noop $noff refs/heads/noff" dst/push-cert &&
test_cmp expect dst/push-cert-status
'