]> Sergey Matveev's repositories - public-inbox.git/commitdiff
lei_mirror: differentiate -entv vs -ent
authorEric Wong <e@80x24.org>
Mon, 28 Nov 2022 05:31:30 +0000 (05:31 +0000)
committerEric Wong <e@80x24.org>
Mon, 28 Nov 2022 23:38:55 +0000 (23:38 +0000)
It makes the code easier-to-follow when we have a single
versus multiple entities (`v' for vector, à la `argv').

lib/PublicInbox/LeiMirror.pm

index 40164b676ddb7591536789161ef3a7d14ab1ef35..faf6a3b6f09fb97a37341ed74b105d813c1e1426 100644 (file)
@@ -392,7 +392,7 @@ sub v2_done { # called via OnDestroy
        my $mg = PublicInbox::MultiGit->new($dst, 'all.git', 'git');
        $mg->fill_alternates;
        for my $i ($mg->git_epochs) { $mg->epoch_cfg_set($i) }
-       my $entries = delete($self->{-ent}) // [];
+       my $entries = delete($self->{-entv}) // [];
        while (@$entries) {
                my ($edst, $ent) = splice(@$entries);
                if (defined(my $o = $ent->{owner})) {
@@ -450,7 +450,7 @@ failed to extract epoch number from $src
                }
                if (!$want || $want->{$nr}) {
                        push @src_edst, $src, $edst;
-                       push @{$task->{-ent}}, $edst, $ent;
+                       push @{$task->{-entv}}, $edst, $ent;
                } else { # create a placeholder so users only need to chmod +w
                        init_placeholder($src, $edst, $ent);
                        push @{$task->{-read_only}}, $edst;