about summary refs log tree commit homepage
diff options
context:
space:
mode:
-rw-r--r--lib/PublicInbox/V2Writable.pm8
-rw-r--r--t/v2writable.t2
2 files changed, 5 insertions, 5 deletions
diff --git a/lib/PublicInbox/V2Writable.pm b/lib/PublicInbox/V2Writable.pm
index 30ca9cec..dc96b87a 100644
--- a/lib/PublicInbox/V2Writable.pm
+++ b/lib/PublicInbox/V2Writable.pm
@@ -119,10 +119,10 @@ sub num_for {
                 foreach my $m (@$mids) {
                         # read-only lookup now safe to do after above barrier
                         my $existing = $self->lookup_content($mime, $m);
-                        if ($existing) {
-                                warn "<$m> resent\n";
-                                return; # easy, don't store duplicates
-                        }
+                        # easy, don't store duplicates
+                        # note: do not add more diagnostic info here since
+                        # it gets noisy on public-inbox-watch restarts
+                        return if $existing;
                 }
 
                 # very unlikely:
diff --git a/t/v2writable.t b/t/v2writable.t
index 2088f3fe..85b48d2a 100644
--- a/t/v2writable.t
+++ b/t/v2writable.t
@@ -57,7 +57,7 @@ if ('ensure git configs are correct') {
         my @warn;
         local $SIG{__WARN__} = sub { push @warn, @_ };
         is($im->add($mime), undef, 'obvious duplicate rejected');
-        like(join(' ', @warn), qr/resent/, 'warned about resent message');
+        is(scalar(@warn), 0, 'no warning about resent message');
 
         @warn = ();
         $mime->header_set('Message-Id', '<a-mid@b>', '<c@d>');