aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2021-08-30 16:06:05 -0700
committerJunio C Hamano <gitster@pobox.com>2021-08-30 16:06:05 -0700
commitbfd515ac56ca8ba71ff9798e625dd1d051842872 (patch)
tree063e0307a8fb439e1a2574b6b54e4fbb4d8b2067
parenta8960868518aaee85da308f394503dada14bfcbc (diff)
parentb227bead4d8fb6e75b5c58ba511c7e935b09b24b (diff)
downloadgit-bfd515ac56ca8ba71ff9798e625dd1d051842872.tar.gz
Merge branch 'bc/t5607-avoid-broken-test-fail-prereqs'
The current implementation of GIT_TEST_FAIL_PREREQS is broken in that checking for the lack of a prerequisite would not work. Avoid the use of "if ! test_have_prereq X" in a test script. * bc/t5607-avoid-broken-test-fail-prereqs: t5607: avoid using prerequisites to select algorithm
-rwxr-xr-xt/t5607-clone-bundle.sh5
1 files changed, 3 insertions, 2 deletions
diff --git a/t/t5607-clone-bundle.sh b/t/t5607-clone-bundle.sh
index ed0d911e95..51705aa86a 100755
--- a/t/t5607-clone-bundle.sh
+++ b/t/t5607-clone-bundle.sh
@@ -91,7 +91,8 @@ test_expect_success 'ridiculously long subject in boundary' '
git fetch long-subject-bundle.bdl &&
- if ! test_have_prereq SHA1
+ algo=$(test_oid algo) &&
+ if test "$algo" != sha1
then
echo "@object-format=sha256"
fi >expect &&
@@ -100,7 +101,7 @@ test_expect_success 'ridiculously long subject in boundary' '
$(git rev-parse HEAD) HEAD
EOF
- if test_have_prereq SHA1
+ if test "$algo" = sha1
then
head -n 3 long-subject-bundle.bdl
else