]> git.ipfire.org Git - thirdparty/public-inbox.git/commitdiff
(ext)index: $sync->{unit} => $self->{unit}
authorEric Wong <e@80x24.org>
Fri, 10 Jan 2025 23:20:06 +0000 (23:20 +0000)
committerEric Wong <e@80x24.org>
Tue, 14 Jan 2025 04:45:40 +0000 (04:45 +0000)
Since we were using `local' anyways on the $sync hashref, it's a
trivial swap to move it into $self.

lib/PublicInbox/ExtSearchIdx.pm
lib/PublicInbox/V2Writable.pm

index 6693542b6584b2959283027561b240579acade8d..0080c1db1e5db1508d2e796d80dee4697fbe2f88 100644 (file)
@@ -1167,7 +1167,7 @@ sub eidx_sync { # main entry point
 
 sub update_last_commit { # overrides V2Writable
        my ($self, $sync, $stk) = @_;
-       my $unit = $sync->{unit} // return;
+       my $unit = $self->{unit} // return;
        my $latest_cmt = $stk ? $stk->{latest_cmt} : $self->{latest_cmt};
        defined($latest_cmt) or return;
        my $ibx = $self->{ibx} or die 'BUG: {ibx} missing';
index 4e42b347aa5968df9a8061e02873ecc34272d0ef..5fcc0800639623b55af3fc4e92f99f92c4b7b0b8 100644 (file)
@@ -818,7 +818,7 @@ sub index_oid { # cat_async callback
 # only update last_commit for $i on reindex iff newer than current
 sub update_last_commit {
        my ($self, $sync, $stk) = @_;
-       my $unit = $sync->{unit} // return;
+       my $unit = $self->{unit} // return;
        my $latest_cmt = $stk ? $stk->{latest_cmt} : $self->{latest_cmt};
        defined($latest_cmt) or return;
        my $last = last_epoch_commit($self, $unit->{epoch});
@@ -1137,7 +1137,7 @@ sub index_todo ($$$) {
        }
        local $self->{current_info} = "$pfx ";
        local $self->{latest_cmt};
-       local $sync->{unit} = $unit;
+       local $self->{unit} = $unit;
        while (my ($f, $at, $ct, $oid, $cmt) = $stk->pop_rec) {
                if ($self->{quit}) {
                        warn "waiting to quit...\n";