]> git.ipfire.org Git - thirdparty/public-inbox.git/commitdiff
searchidx: rename {sidx} to {self}
authorEric Wong <e@80x24.org>
Fri, 10 Jan 2025 23:18:57 +0000 (23:18 +0000)
committerEric Wong <e@80x24.org>
Tue, 14 Jan 2025 04:45:34 +0000 (04:45 +0000)
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.

lib/PublicInbox/SearchIdx.pm

index daea0bab047a1f89e8367717700893ea196265b8..24f76c3299489ba38a431a9d59ac6eca3f991523 100644 (file)
@@ -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};