From 92fa424c71d8e86c36095b6ed828ed54d72b7e88 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Tue, 28 May 2019 23:48:49 +0000 Subject: v2writable: localize unindex-range.$EPOCH to $sync state We don't need to stuff that into $self (V2Writable) which can be longer-lived than a ->index_sync invocation. --- lib/PublicInbox/V2Writable.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/PublicInbox/V2Writable.pm b/lib/PublicInbox/V2Writable.pm index eef5576c..315404c5 100644 --- a/lib/PublicInbox/V2Writable.pm +++ b/lib/PublicInbox/V2Writable.pm @@ -840,7 +840,7 @@ Rewritten history? (in $git->{git_dir}) reindexing $git->{git_dir} starting at $range - $self->{"unindex-range.$i"} = "$base..$cur"; + $sync->{"unindex-range.$i"} = "$base..$cur"; } $range; } @@ -983,7 +983,7 @@ sub index_sync { -d $git_dir or next; # missing parts are fine fill_alternates($self, $i); my $git = PublicInbox::Git->new($git_dir); - my $unindex = delete $self->{"unindex-range.$i"}; + my $unindex = delete $sync->{"unindex-range.$i"}; $self->unindex($opts, $git, $unindex) if $unindex; defined(my $range = $sync->{ranges}->[$i]) or next; my $fh = $self->{reindex_pipe} = $git->popen(@cmd, $range); -- cgit v1.2.3-24-ge0c7