Skip to content

Commit 7187eb1

Browse files
bk2204gitster
authored andcommitted
t8003: make hash size independent
One assertion in this test invokes git with core.abbrev set to "40". Since we're expecting the full hash length, use test_oid to look up the full hash length for the hash in use. Signed-off-by: brian m. carlson <[email protected]> Reviewed-by: Eric Sunshine <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 98de0b2 commit 7187eb1

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

t/t8003-blame-corner-cases.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ test_description='git blame corner cases'
66
pick_fc='s/^[0-9a-f^]* *\([^ ]*\) *(\([^ ]*\) .*/\1-\2/'
77

88
test_expect_success setup '
9-
109
echo A A A A A >one &&
1110
echo B B B B B >two &&
1211
echo C C C C C >tres &&
@@ -306,7 +305,7 @@ test_expect_success 'blame coalesce' '
306305
$oid 1) ABC
307306
$oid 2) DEF
308307
EOF
309-
git -c core.abbrev=40 blame -s giraffe >actual &&
308+
git -c core.abbrev=$(test_oid hexsz) blame -s giraffe >actual &&
310309
test_cmp expect actual
311310
'
312311

0 commit comments

Comments
 (0)