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>

brian m. carlson committed Sep 13, 2018 at 05:17 UTC 63477b328e43033ddd3f85bbfb7a442e73298403
1 file changed +2 -2
t/t1405-main-ref-store.sh
+2 -2
@@ -54,7 +54,7 @@ test_expect_success 'for_each_ref(refs/heads/)' '
54 '
55
56 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 &&
58 sort actual > expected &&
59 test_cmp expected actual
60 '
@@ -71,7 +71,7 @@ test_expect_success 'verify_ref(new-master)' '
71 '
72
73 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 &&
75 cat >expected <<-\EOF &&
76 HEAD 0x1
77 refs/heads/master 0x0