Skip to content

Commit b1484ca

Browse files
bk2204gitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 63477b3 commit b1484ca

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

t/t1406-submodule-ref-store.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ test_expect_success 'rename_refs() not allowed' '
3939
'
4040

4141
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 &&
4343
cat >expected <<-\EOF &&
4444
master 0x0
4545
new-master 0x0
@@ -48,7 +48,7 @@ test_expect_success 'for_each_ref(refs/heads/)' '
4848
'
4949

5050
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 &&
5252
sort actual > expected &&
5353
test_cmp expected actual
5454
'
@@ -65,7 +65,7 @@ test_expect_success 'verify_ref(new-master)' '
6565
'
6666

6767
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 &&
6969
cat >expected <<-\EOF &&
7070
HEAD 0x1
7171
refs/heads/master 0x0

0 commit comments

Comments
 (0)