Skip to content

Commit 63477b3

Browse files
bk2204gitster
authored andcommitted
t1405: 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 44171e5 commit 63477b3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

t/t1405-main-ref-store.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ test_expect_success 'for_each_ref(refs/heads/)' '
5454
'
5555

5656
test_expect_success 'for_each_ref() is sorted' '
57-
$RUN for-each-ref refs/heads/ | cut -c 42- >actual &&
57+
$RUN for-each-ref refs/heads/ | cut -d" " -f 2- >actual &&
5858
sort actual > expected &&
5959
test_cmp expected actual
6060
'
@@ -71,7 +71,7 @@ test_expect_success 'verify_ref(new-master)' '
7171
'
7272

7373
test_expect_success 'for_each_reflog()' '
74-
$RUN for-each-reflog | sort -k2 | cut -c 42- >actual &&
74+
$RUN for-each-reflog | sort -k2 | cut -d" " -f 2- >actual &&
7575
cat >expected <<-\EOF &&
7676
HEAD 0x1
7777
refs/heads/master 0x0

0 commit comments

Comments
 (0)