summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2017-06-13 20:47:10 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-06-13 20:47:10 (GMT)
commitd0870466f688789fba46ead22736035b22961903 (patch)
tree2508fa7a052827624993cd6f90fffadfe324b2a3
parentb9a7d55d938a81eb6268196b789d573437492100 (diff)
parent7c2115aa0790fc88bb7c8882f54a7d90c2535e02 (diff)
downloadgit-d0870466f688789fba46ead22736035b22961903.zip
git-d0870466f688789fba46ead22736035b22961903.tar.gz
git-d0870466f688789fba46ead22736035b22961903.tar.bz2
Merge branch 'jk/pack-idx-corruption-safety'
A flaky test has been corrected. * jk/pack-idx-corruption-safety: t5313: make extended-table test more deterministic
-rwxr-xr-xt/t5313-pack-bounds-checks.sh8
1 files changed, 7 insertions, 1 deletions
diff --git a/t/t5313-pack-bounds-checks.sh b/t/t5313-pack-bounds-checks.sh
index a8a587a..9372508 100755
--- a/t/t5313-pack-bounds-checks.sh
+++ b/t/t5313-pack-bounds-checks.sh
@@ -139,7 +139,13 @@ test_expect_success 'bogus offset into v2 extended table' '
test_expect_success 'bogus offset inside v2 extended table' '
# We need two objects here, so we can plausibly require
# an extended table (if the first object were larger than 2^31).
- do_pack "$object $(git rev-parse HEAD)" --index-version=2 &&
+ #
+ # Note that the value is important here. We want $object as
+ # the second entry in sorted-sha1 order. The sha1 of 1485 starts
+ # with "000", which sorts before that of $object (which starts
+ # with "fff").
+ second=$(echo 1485 | git hash-object -w --stdin) &&
+ do_pack "$object $second" --index-version=2 &&
# We have to make extra room for the table, so we cannot
# just munge in place as usual.