From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-4.2 required=3.0 tests=ALL_TRUSTED,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF shortcircuit=no autolearn=ham autolearn_force=no version=3.4.6 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 820821F4A6 for ; Wed, 11 Oct 2023 07:20:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=80x24.org; s=selector1; t=1697008858; bh=7qA8NwddwRvRsX5xhI5DKKV1A+qWPTL0ZV1FWWIgIpQ=; h=From:To:Subject:Date:In-Reply-To:References:From; b=0Ar7a/X09ELaYKGd8LQYkzZTtT3uobArpvFeUqfLljwGRjs2N4eH1KouYaiWijktv /r293e43WSlUsDcBwC4Cbn75L307yzaKsubhS5unIA/EkC8oeHziD7/FyOyLc0pved +ZsaKZiNUKb5fzACspcWcTgeLql8fQ6YJ5yA0wKM= From: Eric Wong To: meta@public-inbox.org Subject: [PATCH 7/9] import: cat_blob is a no-op w/o live fast-import Date: Wed, 11 Oct 2023 07:20:55 +0000 Message-ID: <20231011072057.758022-8-e@80x24.org> In-Reply-To: <20231011072057.758022-1-e@80x24.org> References: <20231011072057.758022-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: 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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/PublicInbox/Import.pm b/lib/PublicInbox/Import.pm index 894ba818..6bb2c66d 100644 --- a/lib/PublicInbox/Import.pm +++ b/lib/PublicInbox/Import.pm @@ -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 {