]> git.ipfire.org Git - thirdparty/public-inbox.git/commitdiff
v2writable: {in_unindex} moved to self
authorEric Wong <e@80x24.org>
Fri, 10 Jan 2025 23:20:11 +0000 (23:20 +0000)
committerEric Wong <e@80x24.org>
Tue, 14 Jan 2025 04:45:44 +0000 (04:45 +0000)
{in_unindex} is already local-ized for $sync, so moving it to
$self is trivial since we use ->async_wait_all to ensure
cat-file requests are done.

lib/PublicInbox/V2Writable.pm

index 0bd49627fbee08702ce84df22bf96fbf04c5cea0..072542cb03256f96c4fc4718daa23208bda28627 100644 (file)
@@ -1014,7 +1014,7 @@ sub unindex_oid ($$;$) { # git->cat_async callback
                return index_finalize($arg, 0);
        my $self = $arg->{self};
        local $self->{current_info} = "$self->{current_info} $oid";
-       my $unindexed = $arg->{in_unindex} ? $arg->{unindexed} : undef;
+       my $unindexed = $self->{in_unindex} ? $arg->{unindexed} : undef;
        my $mm = $self->{mm};
        my $mids = mids(PublicInbox::Eml->new($bref));
        undef $$bref;
@@ -1057,7 +1057,7 @@ sub unindex_todo ($$$) {
        # order does not matter, here:
        my $fh = $unit->{git}->popen(qw(log --raw -r --no-notes --no-color
                                --no-abbrev --no-renames), $unindex_range);
-       local $sync->{in_unindex} = 1;
+       local $self->{in_unindex} = 1;
        my $unindex_oid = $self->can('unindex_oid');
        while (<$fh>) {
                /\A:\d{6} 100644 $OID ($OID) [AM]\tm$/o or next;