Skip to content

Commit

Permalink
Merge branch 'bc/t5607-avoid-broken-test-fail-prereqs' into jch
Browse files Browse the repository at this point in the history
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
  • Loading branch information
gitster committed Aug 23, 2021
2 parents 7b9ec3f + b227bea commit 2252441
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions t/t5607-clone-bundle.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 &&
Expand All @@ -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
Expand Down

0 comments on commit 2252441

Please sign in to comment.