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,AWL,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, T_SCC_BODY_TEXT_LINE 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 8091C1F406 for ; Thu, 30 Nov 2023 09:56:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=80x24.org; s=selector1; t=1701338199; bh=npSYhVwauQ+3PtDngGYW4K2x4HFHnNwRg5NZKcUZl3o=; h=From:To:Subject:Date:From; b=NHQKln0T36sLam6WzVG3dS+04HNqba17sA6UhUHWxYDNh/ojBoGdUTIIOkiIbFVYs /P9+rEuS6bWwmXIgGY8fFBXifChoVfgiXryprx+iHNH9QYzsHOt4n0htL4QRcZJ/Gn w/I0iz3JNsfdu9ZCa0EjUduRFr/9jsQ7ndlsR7ew= From: Eric Wong To: spew@80x24.org Subject: [PATCH] eidxsharefix fixes Date: Thu, 30 Nov 2023 09:56:39 +0000 Message-ID: <20231130095639.372344-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: --- lib/PublicInbox/GitAsyncCat.pm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/PublicInbox/GitAsyncCat.pm b/lib/PublicInbox/GitAsyncCat.pm index 81669307..d078051e 100644 --- a/lib/PublicInbox/GitAsyncCat.pm +++ b/lib/PublicInbox/GitAsyncCat.pm @@ -9,17 +9,17 @@ our $GCF2C; # singleton PublicInbox::Gcf2Client sub ibx_async_cat ($$$$) { my ($ibx, $oid, $cb, $arg) = @_; - my $git = $ibx->{isrch} ? $ibx->{isrch}->{es}->git : - ($ibx->{git} // $ibx->git); + my $isrch = $ibx->{isrch}; + my $git = $isrch ? $isrch->{es}->git : ($ibx->{git} // $ibx->git); # {topdir} means ExtSearch (likely [extindex "all"]) with potentially # 100K alternates. git v2.33+ can handle 100k alternates fairly well. - if (!defined($ibx->{topdir}) && !defined($git->{-tmp}) && + if (!$isrch && !defined($ibx->{topdir}) && !defined($git->{-tmp}) && ($GCF2C //= eval { require PublicInbox::Gcf2Client; PublicInbox::Gcf2Client::new(); } // 0)) { # 0: do not retry if libgit2 or Inline::C are missing $GCF2C->gcf2_async("$oid $git->{git_dir}\n", $cb, $arg); - \undef; + return \undef; } else { # read-only end of git-cat-file pipe $git->cat_async($oid, $cb, $arg); $git->watch_async;