1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-05-31 00:16:20 +02:00

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 <sandals@crustytoothpaste.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
brian m. carlson 2018-09-13 05:17:39 +00:00 committed by Junio C Hamano
parent 44171e5bda
commit 63477b328e

View File

@ -54,7 +54,7 @@ test_expect_success 'for_each_ref(refs/heads/)' '
'
test_expect_success 'for_each_ref() is sorted' '
$RUN for-each-ref refs/heads/ | cut -c 42- >actual &&
$RUN for-each-ref refs/heads/ | cut -d" " -f 2- >actual &&
sort actual > expected &&
test_cmp expected actual
'
@ -71,7 +71,7 @@ test_expect_success 'verify_ref(new-master)' '
'
test_expect_success 'for_each_reflog()' '
$RUN for-each-reflog | sort -k2 | cut -c 42- >actual &&
$RUN for-each-reflog | sort -k2 | cut -d" " -f 2- >actual &&
cat >expected <<-\EOF &&
HEAD 0x1
refs/heads/master 0x0