dumping ground for random patches and texts
 help / color / mirror / Atom feed
* [PATCH] eidxsharefix fixes
@ 2023-11-30  9:56 Eric Wong
  0 siblings, 0 replies; only message in thread
From: Eric Wong @ 2023-11-30  9:56 UTC (permalink / raw)
  To: spew

---
 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;

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2023-11-30  9:56 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-30  9:56 [PATCH] eidxsharefix fixes Eric Wong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).