@matheusbsbs / matheus-bagliano / commits / a114296371
Fork 0

t1050: match object ID paths in a hash-insensitive way

The pattern here looking for failures is specific to SHA-1. Let's create a variable that matches the regex or glob pattern for a path within the objects directory. Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>

brian m. carlson committed May 13, 2020 at 00:53 UTC a1142963710fd71e5e6e0feb0c4020e977301af7
2 files changed +2 -1
t/t1050-large.sh
+1 -1
@@ -64,7 +64,7 @@ test_expect_success 'add a large file or two' '
64 test $count = 1 &&
65 cnt=$(git show-index <"$idx" | wc -l) &&
66 test $cnt = 2 &&
67 - for l in .git/objects/??/??????????????????????????????????????
67 + for l in .git/objects/$OIDPATH_REGEX
68 do
69 test_path_is_file "$l" || continue
70 bad=t
t/test-lib.sh
+1
@@ -1428,6 +1428,7 @@ test_oid_init
1428
1429 ZERO_OID=$(test_oid zero)
1430 OID_REGEX=$(echo $ZERO_OID | sed -e 's/0/[0-9a-f]/g')
1431 +OIDPATH_REGEX=$(test_oid_to_path $ZERO_OID | sed -e 's/0/[0-9a-f]/g')
1432 EMPTY_TREE=$(test_oid empty_tree)
1433 EMPTY_BLOB=$(test_oid empty_blob)
1434 _z40=$ZERO_OID