From 3688ac90abfaa8ad55b0767202aebcc8e2d02147 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sat, 16 Oct 2021 01:00:59 +0000 Subject: extindex: prune invalid alternate entries on --gc Seeing the same warning over and over again gets annoying. --- lib/PublicInbox/MultiGit.pm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'lib/PublicInbox/MultiGit.pm') diff --git a/lib/PublicInbox/MultiGit.pm b/lib/PublicInbox/MultiGit.pm index 91d7998a..9429a00c 100644 --- a/lib/PublicInbox/MultiGit.pm +++ b/lib/PublicInbox/MultiGit.pm @@ -45,7 +45,11 @@ sub read_alternates { $alt{$rel} = $score; } else { warn "W: stat($dir) failed: $! ($f)"; - $alt{$rel} = $score unless $prune; + if ($prune) { + ++$$prune; + } else { + $alt{$rel} = $score; + } } } } elsif (!$!{ENOENT}) { -- cgit v1.2.3-24-ge0c7