diff mbox series

[04/20] t4200: make hash size independent

Message ID 20191221194936.1346664-5-sandals@crustytoothpaste.net (mailing list archive)
State New, archived
Headers show
Series SHA-256 test fixes, part 7 | expand

Commit Message

brian m. carlson Dec. 21, 2019, 7:49 p.m. UTC
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>
---
 t/t4200-rerere.sh | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/t/t4200-rerere.sh b/t/t4200-rerere.sh
index 55b7750ade..831d424c47 100755
--- a/t/t4200-rerere.sh
+++ b/t/t4200-rerere.sh
@@ -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 &&