From 82d793d96cc37d5b3cf562c7081bfacb05d1e4cd Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Tue, 15 Sep 2020 19:51:37 +0000 Subject: treewide: relax allow >=40 chars for git OID This will help with eventual git SHA-256 transitions. --- lib/PublicInbox/Import.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/PublicInbox/Import.pm') diff --git a/lib/PublicInbox/Import.pm b/lib/PublicInbox/Import.pm index ee5ca2ea..1a226cc7 100644 --- a/lib/PublicInbox/Import.pm +++ b/lib/PublicInbox/Import.pm @@ -106,7 +106,7 @@ sub _cat_blob ($$$) { local $/ = "\n"; my $info = <$r>; defined $info or die "EOF from fast-import / cat-blob: $!"; - $info =~ /\A[a-f0-9]{40} blob ([0-9]+)\n\z/ or return; + $info =~ /\A[a-f0-9]{40,} blob ([0-9]+)\n\z/ or return; my $left = $1; my $offset = 0; my $buf = ''; @@ -137,7 +137,7 @@ sub check_remove_v1 { my ($r, $w, $tip, $path, $mime) = @_; my $info = _check_path($r, $w, $tip, $path) or return ('MISSING',undef); - $info =~ m!\A100644 blob ([a-f0-9]{40})\t!s or die "not blob: $info"; + $info =~ m!\A100644 blob ([a-f0-9]{40,})\t!s or die "not blob: $info"; my $oid = $1; my $msg = _cat_blob($r, $w, $oid) or die "BUG: cat-blob $1 failed"; my $cur = PublicInbox::Eml->new($msg); -- cgit v1.2.3-24-ge0c7