X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=lib%2FPublicInbox%2FLeiQuery.pm;h=effc572f6aaf45e658b1434537081342e29efe7e;hb=bb0eab1051318528011252866b592735981084a5;hp=56b82acc8b5b7da13cfc3dace4712e7d5f44b468;hpb=01a049cadb1080698a447479de806755e9bc9342;p=public-inbox.git diff --git a/lib/PublicInbox/LeiQuery.pm b/lib/PublicInbox/LeiQuery.pm index 56b82acc..effc572f 100644 --- a/lib/PublicInbox/LeiQuery.pm +++ b/lib/PublicInbox/LeiQuery.pm @@ -95,18 +95,11 @@ sub lxs_prepare { } # --external is enabled by default, but allow --no-external if ($opt->{external} //= 1) { - my %x; - for my $loc (@{$opt->{exclude} // []}) { - my @l = $self->get_externals($loc, 1) or return; - $x{$_} = 1 for @l; - } - my $ne = $self->externals_each(\&prep_ext, $lxs, \%x); + my $ex = $self->canonicalize_excludes($opt->{exclude}); + $self->externals_each(\&prep_ext, $lxs, $ex); $opt->{remote} //= !($lxs->locals - $opt->{'local'}); - if ($opt->{'local'}) { - $lxs->{remotes} = \@iremotes if !$opt->{remote}; - } else { - $lxs->{locals} = \@ilocals; - } + $lxs->{locals} = \@ilocals if !$opt->{'local'}; + $lxs->{remotes} = \@iremotes if !$opt->{remote}; } } ($lxs->locals || $lxs->remotes) ? ($self->{lxs} = $lxs) :