Skip to content

Commit

Permalink
t8003: make hash size independent
Browse files Browse the repository at this point in the history
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 <sandals@crustytoothpaste.net>
Reviewed-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
bk2204 authored and gitster committed Jul 30, 2020
1 parent 98de0b2 commit 7187eb1
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions t/t8003-blame-corner-cases.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ test_description='git blame corner cases'
pick_fc='s/^[0-9a-f^]* *\([^ ]*\) *(\([^ ]*\) .*/\1-\2/'

test_expect_success setup '
echo A A A A A >one &&
echo B B B B B >two &&
echo C C C C C >tres &&
Expand Down Expand Up @@ -306,7 +305,7 @@ test_expect_success 'blame coalesce' '
$oid 1) ABC
$oid 2) DEF
EOF
git -c core.abbrev=40 blame -s giraffe >actual &&
git -c core.abbrev=$(test_oid hexsz) blame -s giraffe >actual &&
test_cmp expect actual
'

Expand Down

0 comments on commit 7187eb1

Please sign in to comment.