t1406: make hash-size independent
Instead of hard-coding a 40-based constant, split the output of for-each-ref and for-each-reflog by field. Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
brian m. carlson committed
Sep 13, 2018 at 05:17 UTC
b1484ca94a146470ae6bacc86afcf336d872dd4d
1 file changed
+3
-3
t/t1406-submodule-ref-store.sh
+3
-3
@@ -39,7 +39,7 @@ test_expect_success 'rename_refs() not allowed' '
39
'
40
41
test_expect_success 'for_each_ref(refs/heads/)' '
42
- $RUN for-each-ref refs/heads/ | cut -c 42- >actual &&
42
+ $RUN for-each-ref refs/heads/ | cut -d" " -f 2- >actual &&
43
cat >expected <<-\EOF &&
44
master 0x0
45
new-master 0x0
@@ -48,7 +48,7 @@ test_expect_success 'for_each_ref(refs/heads/)' '
48
'
49
50
test_expect_success 'for_each_ref() is sorted' '
51
- $RUN for-each-ref refs/heads/ | cut -c 42- >actual &&
51
+ $RUN for-each-ref refs/heads/ | cut -d" " -f 2- >actual &&
52
sort actual > expected &&
53
test_cmp expected actual
54
'
@@ -65,7 +65,7 @@ test_expect_success 'verify_ref(new-master)' '
65
'
66
67
test_expect_success 'for_each_reflog()' '
68
- $RUN for-each-reflog | sort | cut -c 42- >actual &&
68
+ $RUN for-each-reflog | sort | cut -d" " -f 2- >actual &&
69
cat >expected <<-\EOF &&
70
HEAD 0x1
71
refs/heads/master 0x0