t8011: make hash size independent
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>
This commit is contained in:
parent
7187eb1e6a
commit
db00af977f
@ -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 (.*)/) {
|
||||
|
Loading…
Reference in New Issue
Block a user