* [PATCH 09/10] lei forget-external: don't show redundant "not found"
@ 2021-01-23 10:27 7% ` Eric Wong
0 siblings, 0 replies; 1+ results
From: Eric Wong @ 2021-01-23 10:27 UTC (permalink / raw)
To: meta
Pathname/URL canonicalization may not change the result at
all, so there's no point in trying (and failing) the same
form twice if pre and post-canonicalization are identical.
---
lib/PublicInbox/LeiExternal.pm | 2 ++
1 file changed, 2 insertions(+)
diff --git a/lib/PublicInbox/LeiExternal.pm b/lib/PublicInbox/LeiExternal.pm
index 5b5f08d1..e7693e09 100644
--- a/lib/PublicInbox/LeiExternal.pm
+++ b/lib/PublicInbox/LeiExternal.pm
@@ -69,9 +69,11 @@ sub lei_forget_external {
my ($self, @locations) = @_;
my $cfg = $self->_lei_cfg(1);
my $quiet = $self->{opt}->{quiet};
+ my %seen;
for my $loc (@locations) {
my (@unset, @not_found);
for my $l ($loc, _canonicalize($loc)) {
+ next if $seen{$l}++;
my $key = "external.$l.boost";
delete($cfg->{$key});
$self->_config('--unset', $key);
^ permalink raw reply related [relevance 7%]
Results 1-1 of 1 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2021-01-23 10:27 [PATCH 00/10] lei: externals more stuff Eric Wong
2021-01-23 10:27 7% ` [PATCH 09/10] lei forget-external: don't show redundant "not found" Eric Wong
Code repositories for project(s) associated with this public inbox
https://80x24.org/public-inbox.git
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).