]> Sergey Matveev's repositories - public-inbox.git/commitdiff
inbox: do not vivify {-repo_objs} during cleanup
authorEric Wong <e@80x24.org>
Wed, 29 Sep 2021 00:14:28 +0000 (00:14 +0000)
committerEric Wong <e@80x24.org>
Wed, 29 Sep 2021 02:45:26 +0000 (02:45 +0000)
This caused config->repo_objs to not fill in {-repo_objs}
properly before starting solver.

Reported-by: Kyle Meyer <kyle@kyleam.com>
Link: https://public-inbox.org/meta/87o88cqobd.fsf@kyleam.com/
Fixes: 63d7b8ceee55a34 ("daemons: revamp periodic cleanup task")
lib/PublicInbox/Inbox.pm

index c525f4d169d250fd6e007afc633edb844d5a4078..95467d5ac54b12aa046efbbcb60771aa566240c8 100644 (file)
@@ -30,7 +30,7 @@ sub do_cleanup {
        my ($ibx) = @_;
        my $live = git_cleanup($ibx);
        $ibx->cleanup_shards and $live = 1;
-       for my $git (@{$ibx->{-repo_objs}}) {
+       for my $git (@{$ibx->{-repo_objs} // []}) {
                $live = 1 if $git->cleanup(1);
        }
        delete @$ibx{qw(over mm description cloneurl