From 7d2e572aca7297ea2015d2b6e7c71b672521ec82 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sat, 20 Mar 2021 19:04:03 +0900 Subject: lei: All Local Externals: bare git dir for alternates This will be used for keyword (and label) storage for externals. We'll be using this to ensure we don't redundantly auto-import messages into lei/store if they're already in a local external (they can still be imported explicitly via "lei import"). --- lib/PublicInbox/LeiExternal.pm | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'lib/PublicInbox/LeiExternal.pm') diff --git a/lib/PublicInbox/LeiExternal.pm b/lib/PublicInbox/LeiExternal.pm index b5dd85e1..aa09be9e 100644 --- a/lib/PublicInbox/LeiExternal.pm +++ b/lib/PublicInbox/LeiExternal.pm @@ -139,6 +139,12 @@ sub add_external_finish { my $key = "external.$location.boost"; my $cur_boost = $cfg->{$key}; return if defined($cur_boost) && $cur_boost == $new_boost; # idempotent + if (-d $location) { + require PublicInbox::LeiXSearch; + my $lxs = PublicInbox::LeiXSearch->new; + $lxs->prepare_external($location); + $self->ale->refresh_externals($lxs); + } $self->lei_config($key, $new_boost); } -- cgit v1.2.3-24-ge0c7