diff options
author | Junio C Hamano <gitster@pobox.com> | 2017-06-24 15:29:29 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-06-24 15:29:29 -0700 |
commit | 7deb48af0f884c4053e4ac2633ad06fa97ac206c (patch) | |
tree | 3e4cc229a38391ce2ce1a090fc7d1fab3955f22a /t | |
parent | Merge branch 'jk/diff-blob' into maint (diff) | |
parent | t5313: make extended-table test more deterministic (diff) | |
download | tgif-7deb48af0f884c4053e4ac2633ad06fa97ac206c.tar.xz |
Merge branch 'jk/pack-idx-corruption-safety' into maint
A flaky test has been corrected.
* jk/pack-idx-corruption-safety:
t5313: make extended-table test more deterministic
Diffstat (limited to 't')
-rwxr-xr-x | t/t5313-pack-bounds-checks.sh | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/t/t5313-pack-bounds-checks.sh b/t/t5313-pack-bounds-checks.sh index a8a587abc3..9372508c99 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. |