t1407: 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
43c94bbfd88a89a45cc75b93bdb93aab1e7772af
1 file changed
+2
-2
t/t1407-worktree-ref-store.sh
+2
-2
@@ -58,7 +58,7 @@ test_expect_success 'for_each_reflog()' '
58
mkdir -p .git/worktrees/wt/logs/refs/bisect &&
59
echo $ZERO_OID > .git/worktrees/wt/logs/refs/bisect/wt-random &&
60
61
- $RWT for-each-reflog | cut -c 42- | sort >actual &&
61
+ $RWT for-each-reflog | cut -d" " -f 2- | sort >actual &&
62
cat >expected <<-\EOF &&
63
HEAD 0x1
64
PSEUDO-WT 0x0
@@ -68,7 +68,7 @@ test_expect_success 'for_each_reflog()' '
68
EOF
69
test_cmp expected actual &&
70
71
- $RMAIN for-each-reflog | cut -c 42- | sort >actual &&
71
+ $RMAIN for-each-reflog | cut -d" " -f 2- | sort >actual &&
72
cat >expected <<-\EOF &&
73
HEAD 0x1
74
PSEUDO-MAIN 0x0