Skip to content

Commit

Permalink
t8011: make hash size independent
Browse files Browse the repository at this point in the history
Allow lines which start with either a 40- or 64-character hex object ID,
to allow for both SHA-1 and SHA-256.

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 7187eb1 commit db00af9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion t/t8011-blame-split-file.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ test_expect_success 'setup simulated porcelain' '
cat >read-porcelain.pl <<-\EOF
my $field = shift;
while (<>) {
if (/^[0-9a-f]{40} /) {
if (/^[0-9a-f]{40,} /) {
flush();
$hash = $&;
} elsif (/^$field (.*)/) {
Expand Down

0 comments on commit db00af9

Please sign in to comment.