From b32f0448c40db9a8bee6f90c566cdc5f4ffad35a Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Tue, 24 Oct 2023 11:44:27 +0000 Subject: [PATCH] cindex: --associate fails when no inboxes are given This functionality still needs to be fleshed out, but we definitely can't associate coderepos to inboxes if we don't have any inboxes as candidates. --- lib/PublicInbox/CodeSearchIdx.pm | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/PublicInbox/CodeSearchIdx.pm b/lib/PublicInbox/CodeSearchIdx.pm index 36d00aea7..2d1d8b223 100644 --- a/lib/PublicInbox/CodeSearchIdx.pm +++ b/lib/PublicInbox/CodeSearchIdx.pm @@ -930,9 +930,8 @@ sub init_associate_postfork ($) { require_progs('associate', join => \@JOIN); $QRY_STR = $self->{-opt}->{'associate-date-range'} // '1.year.ago..'; substr($QRY_STR, 0, 0) = 'dt:'; - scalar(@{$self->{git_dirs} // []}) or die <{git_dirs} // []} or die "E: no coderepos to associate\n"; + @IBX or die "E: no inboxes to associate\n"; my $approx_git = PublicInbox::Git->new($self->{git_dirs}->[0]); # ugh $self->query_approxidate($approx_git, $QRY_STR); # in-place $TODO{associate} = PublicInbox::OnDestroy->new($$, \&associate, $self); -- 2.47.2