about summary refs log tree commit homepage
path: root/lib/PublicInbox/SolverGit.pm
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2022-09-10 20:10:24 +0000
committerEric Wong <e@80x24.org>2022-09-11 19:25:47 +0000
commit66eb1f1d9d7eb8fe892e328f6a5e656d1df7836b (patch)
tree1212e693c7afca6a50588bb9faf4bdb2ce0e03a6 /lib/PublicInbox/SolverGit.pm
parentf5e2daa70e0a1a75d1220d84193f3eeebb799c38 (diff)
downloadpublic-inbox-66eb1f1d9d7eb8fe892e328f6a5e656d1df7836b.tar.gz
Messages in /all/ can get duplicated at times due to
list-appended signatures or buggy/malicious clients.
They'll all show up based on /$INBOX/$MSGID/,
so deduplicate the URLs to avoid noise.
Diffstat (limited to 'lib/PublicInbox/SolverGit.pm')
-rw-r--r--lib/PublicInbox/SolverGit.pm5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/PublicInbox/SolverGit.pm b/lib/PublicInbox/SolverGit.pm
index ac655f34..b723b48a 100644
--- a/lib/PublicInbox/SolverGit.pm
+++ b/lib/PublicInbox/SolverGit.pm
@@ -554,8 +554,9 @@ sub extract_diffs_done {
         my $diffs = delete $self->{tmp_diffs};
         if (scalar @$diffs) {
                 unshift @{$self->{patches}}, @$diffs;
-                dbg($self, "found $want->{oid_b} in " .  join(" ||\n\t",
-                        map { di_url($self, $_) } @$diffs));
+                my %seen; # List::Util::uniq requires Perl 5.26+ :<
+                my @u = grep { !$seen{$_}++ } map { di_url($self, $_) } @$diffs;
+                dbg($self, "found $want->{oid_b} in " .  join(" ||\n\t", @u));
                 ++$self->{nr_p};
 
                 # good, we can find a path to the oid we $want, now