]> git.ipfire.org Git - thirdparty/git.git/commitdiff
t4200: make hash size independent
authorbrian m. carlson <sandals@crustytoothpaste.net>
Sat, 21 Dec 2019 19:49:20 +0000 (19:49 +0000)
committerJunio C Hamano <gitster@pobox.com>
Wed, 15 Jan 2020 22:06:19 +0000 (14:06 -0800)
Instead of hard-coding a fixed length example object ID in the test,
look one up using the translation tables.

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t4200-rerere.sh

index 55b7750ade1c5fd225f830bbbfcb42938abcbe37..831d424c4720924275b9071d4ad5edf8fc73734a 100755 (executable)
@@ -25,6 +25,7 @@ test_description='git rerere
 . ./test-lib.sh
 
 test_expect_success 'setup' '
+       test_oid_init &&
        cat >a1 <<-\EOF &&
        Some title
        ==========
@@ -210,7 +211,7 @@ test_expect_success 'set up for garbage collection tests' '
        echo Hello >$rr/preimage &&
        echo World >$rr/postimage &&
 
-       sha2=4000000000000000000000000000000000000000 &&
+       sha2=$(test_oid deadbeef) &&
        rr2=.git/rr-cache/$sha2 &&
        mkdir $rr2 &&
        echo Hello >$rr2/preimage &&