about summary refs log tree commit homepage
path: root/lib/PublicInbox
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2022-11-28 05:32:21 +0000
committerEric Wong <e@80x24.org>2022-11-28 23:38:59 +0000
commit5cb15eabbd8df11656081f4ff504fc6c9a82a37a (patch)
tree2e8f4fe0df23a25844304cb8573e18b4b8c739c9 /lib/PublicInbox
parentecb2dcb376017475ac55b2847bc09ce2767e3ba9 (diff)
downloadpublic-inbox-5cb15eabbd8df11656081f4ff504fc6c9a82a37a.tar.gz
We may be able to save some memory this way.
Diffstat (limited to 'lib/PublicInbox')
-rw-r--r--lib/PublicInbox/LeiMirror.pm26
1 files changed, 14 insertions, 12 deletions
diff --git a/lib/PublicInbox/LeiMirror.pm b/lib/PublicInbox/LeiMirror.pm
index 79861d64..f7db5a49 100644
--- a/lib/PublicInbox/LeiMirror.pm
+++ b/lib/PublicInbox/LeiMirror.pm
@@ -881,18 +881,20 @@ sub multi_inbox ($$$) {
 sub clone_all {
         my ($self, $m) = @_;
         my $todo = delete $self->{todo};
-        my $nodep = delete $todo->{''};
-
-        # do not download unwanted deps
-        my $any_want = delete $self->{any_want};
-        my @unwanted = grep { !$any_want->{$_} } keys %$todo;
-        my @nodep = delete(@$todo{@unwanted});
-        push(@$nodep, @$_) for @nodep;
-
-        # handle no-dependency repos, first
-        for (@$nodep) {
-                clone_v1($_, 1);
-                return if !keep_going($self);
+        {
+                my $nodep = delete $todo->{''};
+
+                # do not download unwanted deps
+                my $any_want = delete $self->{any_want};
+                my @unwanted = grep { !$any_want->{$_} } keys %$todo;
+                my @nodep = delete(@$todo{@unwanted});
+                push(@$nodep, @$_) for @nodep;
+
+                # handle no-dependency repos, first
+                for (@$nodep) {
+                        clone_v1($_, 1);
+                        return if !keep_going($self);
+                }
         }
         # resolve references, deepest, first:
         while (scalar keys %$todo) {