From f4609b896fac842433bd495c166d5987852a6a73 Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Sat, 21 Nov 2020 19:20:35 +0100 Subject: merge(3p/git): Merge git subtree at v2.29.2 This also bumps the stable nixpkgs to 20.09 as of 2020-11-21, because there is some breakage in the git build related to the netrc credentials helper which someone has taken care of in nixpkgs. The stable channel is not used for anything other than git, so this should be fine. Change-Id: I3575a19dab09e1e9556cf8231d717de9890484fb --- third_party/git/t/t5308-pack-detect-duplicates.sh | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) (limited to 'third_party/git/t/t5308-pack-detect-duplicates.sh') diff --git a/third_party/git/t/t5308-pack-detect-duplicates.sh b/third_party/git/t/t5308-pack-detect-duplicates.sh index 6845c1f3c3..693b2411c8 100755 --- a/third_party/git/t/t5308-pack-detect-duplicates.sh +++ b/third_party/git/t/t5308-pack-detect-duplicates.sh @@ -4,23 +4,27 @@ test_description='handling of duplicate objects in incoming packfiles' . ./test-lib.sh . "$TEST_DIRECTORY"/lib-pack.sh -if ! test_have_prereq SHA1 -then - skip_all='not using SHA-1 for objects' - test_done -fi +test_expect_success 'setup' ' + test_oid_cache <<-EOF + lo_oid sha1:e68fe8129b546b101aee9510c5328e7f21ca1d18 + lo_oid sha256:471819e8c52bf11513f100b2810a8aa0622d5cd3d1c913758a071dd4b3bad8fe + + missing_oid sha1:e69d000000000000000000000000000000000000 + missing_oid sha256:4720000000000000000000000000000000000000000000000000000000000000 + EOF +' # The sha1s we have in our pack. It's important that these have the same # starting byte, so that they end up in the same fanout section of the index. # That lets us make sure we are exercising the binary search with both sets. -LO_SHA1=e68fe8129b546b101aee9510c5328e7f21ca1d18 -HI_SHA1=e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 +LO_SHA1=$(test_oid lo_oid) +HI_SHA1=$EMPTY_BLOB # And here's a "missing sha1" which will produce failed lookups. It must also # be in the same fanout section, and should be between the two (so that during # our binary search, we are sure to end up looking at one or the other of the # duplicate runs). -MISSING_SHA1='e69d000000000000000000000000000000000000' +MISSING_SHA1=$(test_oid missing_oid) # git will never intentionally create packfiles with # duplicate objects, so we have to construct them by hand. -- cgit 1.4.1