@matheusbsbs / matheus-bagliano / commits / 08a9dd891c
Fork 0

t4134: compute appropriate length constant

Instead of using a specific invalid hard-coded object ID, generate one of the appropriate length by looking one up in the translation tables. Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>

brian m. carlson committed Dec 21, 2019 at 19:49 UTC 08a9dd891c5808c2ab6e8b7fc5812e1f0cea1354
1 file changed +3 -2
t/t4134-apply-submodule.sh
+3 -2
@@ -8,6 +8,7 @@ test_description='git apply submodule tests'
8 . ./test-lib.sh
9
10 test_expect_success setup '
11 + test_oid_init &&
12 cat > create-sm.patch <<EOF &&
13 diff --git a/dir/sm b/dir/sm
14 new file mode 160000
@@ -15,7 +16,7 @@ index 0000000..0123456
16 --- /dev/null
17 +++ b/dir/sm
18 @@ -0,0 +1 @@
18 -+Subproject commit 0123456789abcdef0123456789abcdef01234567
19 ++Subproject commit $(test_oid numeric)
20 EOF
21 cat > remove-sm.patch <<EOF
22 diff --git a/dir/sm b/dir/sm
@@ -24,7 +25,7 @@ index 0123456..0000000
25 --- a/dir/sm
26 +++ /dev/null
27 @@ -1 +0,0 @@
27 --Subproject commit 0123456789abcdef0123456789abcdef01234567
28 +-Subproject commit $(test_oid numeric)
29 EOF
30 '
31