t3600: make hash size independent
Instead of hard-coding a fixed length invalid object ID in the test, compute one using the lookup tables. Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
brian m. carlson committed
Aug 18, 2019 at 19:16 UTC
ca6ba94200dc8e96dc9e495273aff6a7399cf1e9
1 file changed
+3
-1
t/t3600-rm.sh
+3
-1
@@ -240,12 +240,14 @@ test_expect_success 'refresh index before checking if it is up-to-date' '
240
'
241
242
test_expect_success 'choking "git rm" should not let it die with cruft' '
243
+ test_oid_init &&
244
git reset -q --hard &&
245
test_when_finished "rm -f .git/index.lock && git reset -q --hard" &&
246
i=0 &&
247
+ hash=$(test_oid deadbeef) &&
248
while test $i -lt 12000
249
do
248
- echo "100644 1234567890123456789012345678901234567890 0 some-file-$i"
250
+ echo "100644 $hash 0 some-file-$i"
251
i=$(( $i + 1 ))
252
done | git update-index --index-info &&
253
git rm -n "some-file-*" | : &&