Skip to content

Commit bfd515a

Browse files
committed
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
2 parents a896086 + b227bea commit bfd515a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

t/t5607-clone-bundle.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,8 @@ test_expect_success 'ridiculously long subject in boundary' '
9191
9292
git fetch long-subject-bundle.bdl &&
9393
94-
if ! test_have_prereq SHA1
94+
algo=$(test_oid algo) &&
95+
if test "$algo" != sha1
9596
then
9697
echo "@object-format=sha256"
9798
fi >expect &&
@@ -100,7 +101,7 @@ test_expect_success 'ridiculously long subject in boundary' '
100101
$(git rev-parse HEAD) HEAD
101102
EOF
102103
103-
if test_have_prereq SHA1
104+
if test "$algo" = sha1
104105
then
105106
head -n 3 long-subject-bundle.bdl
106107
else

0 commit comments

Comments
 (0)