]> git.ipfire.org Git - thirdparty/public-inbox.git/commitdiff
import: cat_blob is a no-op w/o live fast-import
authorEric Wong <e@80x24.org>
Wed, 11 Oct 2023 07:20:55 +0000 (07:20 +0000)
committerEric Wong <e@80x24.org>
Wed, 11 Oct 2023 22:10:50 +0000 (22:10 +0000)
cat_blob is a fallback for handling files which haven't made it
onto disk to be readable by `git cat-file'.  Thus spawning a new
fast-import process to retrieve a blob is pointless, as cat_blob
is only used as a last resort when `git cat-file' fails.

lib/PublicInbox/Import.pm

index 894ba81804fc363d7da3ab7fb595ebaa9c2a3067..6bb2c66d868407a4d7edb4d48eabe779dfc61dc4 100644 (file)
@@ -123,7 +123,7 @@ sub _cat_blob ($$) {
 
 sub cat_blob {
        my ($self, $oid) = @_;
-       _cat_blob(gfi_start($self), $oid);
+       _cat_blob($self->{io} // return, $oid);
 }
 
 sub check_remove_v1 {