From: Eric Wong Date: Fri, 10 Jan 2025 23:18:57 +0000 (+0000) Subject: searchidx: rename {sidx} to {self} X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d4a18ba1e19c4433ab9a7075f3cbdabe0f6e9cb4;p=thirdparty%2Fpublic-inbox.git searchidx: rename {sidx} to {self} While this is v1-only code, {self} is more consistent with the rest of the code and the eventual goal is to eliminate $sync entirely in favor of $self for temporary state. --- diff --git a/lib/PublicInbox/SearchIdx.pm b/lib/PublicInbox/SearchIdx.pm index daea0bab0..24f76c329 100644 --- a/lib/PublicInbox/SearchIdx.pm +++ b/lib/PublicInbox/SearchIdx.pm @@ -802,7 +802,7 @@ sub v1_index_both { # git->cat_async callback return if is_bad_blob($oid, $type, $size, $sync->{oid}); my $smsg = bless { blob => $oid }, 'PublicInbox::Smsg'; $smsg->set_bytes($$bref, $size); - my $self = $sync->{sidx}; + my $self = $sync->{self}; update_checkpoint $self, $smsg->{bytes}; local $self->{current_info} = "$self->{current_info}: $oid"; my $eml = PublicInbox::Eml->new($bref); @@ -818,7 +818,7 @@ sub v1_index_both { # git->cat_async callback sub v1_unindex_both { # git->cat_async callback my ($bref, $oid, $type, $size, $sync) = @_; return if is_bad_blob($oid, $type, $size, $sync->{oid}); - my $self = $sync->{sidx}; + my $self = $sync->{self}; local $self->{current_info} = "$self->{current_info}: $oid"; v1_unindex_eml $self, $oid, PublicInbox::Eml->new($bref); # may be undef if leftover @@ -908,7 +908,7 @@ sub v1_process_stack ($$$) { my ($self, $sync, $stk) = @_; my $git = $sync->{ibx}->git; $self->{nrec} = 0; - $sync->{sidx} = $self; + $sync->{self} = $self; local $self->{need_checkpoint} = 0; local $self->{latest_cmt};