about summary refs log tree commit homepage
path: root/lib/PublicInbox
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2016-06-24 23:40:01 +0000
committerEric Wong <e@80x24.org>2016-06-25 00:25:29 +0000
commit8f5c76542fe6e0b78095c3a748fd10dd01a714ef (patch)
tree021dbc78c759c9af59515f79f6cb368af3f9e255 /lib/PublicInbox
parenta2295236b67ae5bffd346a0b9590748db48ccd4e (diff)
downloadpublic-inbox-8f5c76542fe6e0b78095c3a748fd10dd01a714ef.tar.gz
This quiets a (hopefully harmless) warning when a ref remains
alive through several expiry timeouts.
Diffstat (limited to 'lib/PublicInbox')
-rw-r--r--lib/PublicInbox/Inbox.pm6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/PublicInbox/Inbox.pm b/lib/PublicInbox/Inbox.pm
index 3f1b7334..34191fc7 100644
--- a/lib/PublicInbox/Inbox.pm
+++ b/lib/PublicInbox/Inbox.pm
@@ -5,7 +5,7 @@
 package PublicInbox::Inbox;
 use strict;
 use warnings;
-use Scalar::Util qw(weaken);
+use Scalar::Util qw(weaken isweak);
 use PublicInbox::Git;
 use PublicInbox::MID qw(mid2path);
 
@@ -19,7 +19,9 @@ sub new {
 
 sub weaken_all {
         my ($self) = @_;
-        weaken($self->{$_}) foreach qw(git mm search);
+        foreach my $f (qw(git mm search)) {
+                isweak($self->{$f}) or weaken($self->{$f});
+        }
 }
 
 sub git {