about summary refs log tree commit homepage
path: root/lib/PublicInbox/Import.pm
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2020-09-15 19:51:37 +0000
committerEric Wong <e@80x24.org>2020-09-16 04:06:10 +0000
commit82d793d96cc37d5b3cf562c7081bfacb05d1e4cd (patch)
treea66af407cfa46641a77f60631cef50a8c487bbb4 /lib/PublicInbox/Import.pm
parent9cdeab04ebd95c7f778ba5f258399377b180f2cc (diff)
downloadpublic-inbox-82d793d96cc37d5b3cf562c7081bfacb05d1e4cd.tar.gz
treewide: relax allow >=40 chars for git OID
This will help with eventual git SHA-256 transitions.
Diffstat (limited to 'lib/PublicInbox/Import.pm')
-rw-r--r--lib/PublicInbox/Import.pm4
1 files changed, 2 insertions, 2 deletions
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);