]> git.ipfire.org Git - thirdparty/git.git/commitdiff
t8011: make hash size independent
authorbrian m. carlson <sandals@crustytoothpaste.net>
Wed, 29 Jul 2020 23:14:09 +0000 (23:14 +0000)
committerJunio C Hamano <gitster@pobox.com>
Thu, 30 Jul 2020 16:16:47 +0000 (09:16 -0700)
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>
t/t8011-blame-split-file.sh

index 831125047b93a454e69f5f64f4df7380be38ae0a..bdda0c03fe9ea6fc536fb2711051fed066d7c421 100755 (executable)
@@ -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 (.*)/) {