From: Eric Wong Date: Fri, 10 Jan 2025 23:20:06 +0000 (+0000) Subject: (ext)index: $sync->{unit} => $self->{unit} X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=08b7014e82f275b65dfb5d2b07e4f7b5647f5d34;p=thirdparty%2Fpublic-inbox.git (ext)index: $sync->{unit} => $self->{unit} Since we were using `local' anyways on the $sync hashref, it's a trivial swap to move it into $self. --- diff --git a/lib/PublicInbox/ExtSearchIdx.pm b/lib/PublicInbox/ExtSearchIdx.pm index 6693542b6..0080c1db1 100644 --- a/lib/PublicInbox/ExtSearchIdx.pm +++ b/lib/PublicInbox/ExtSearchIdx.pm @@ -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'; diff --git a/lib/PublicInbox/V2Writable.pm b/lib/PublicInbox/V2Writable.pm index 4e42b347a..5fcc08006 100644 --- a/lib/PublicInbox/V2Writable.pm +++ b/lib/PublicInbox/V2Writable.pm @@ -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";