зеркало из https://github.com/microsoft/git.git
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:
Родитель
7187eb1e6a
Коммит
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 (.*)/) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче