]> git.ipfire.org Git - thirdparty/public-inbox.git/commitdiff
cindex: fix --no-scan --prune
authorEric Wong <e@80x24.org>
Mon, 8 May 2023 16:58:14 +0000 (16:58 +0000)
committerEric Wong <e@80x24.org>
Tue, 9 May 2023 02:51:17 +0000 (02:51 +0000)
We must define $GIT_TODO to be non-undef when using --no-scan
for prune-only invocations to run.  I'm leaning towards making
--no-scan a publicly-documented switch for -cindex; but I'm
less certain about documenting it for -index and -extindex...

lib/PublicInbox/CodeSearchIdx.pm

index d92d87fc46d9ae35b7b9eb40a4137c39780e874e..0a6b8fce24cfe343c1b2fce8661c9a1a7d10c946 100644 (file)
@@ -871,9 +871,9 @@ sub cidx_run { # main entry point
        local $LIVE = {};
        local $PRUNE_DONE = [];
        local $IDX_TODO = [];
+       local $GIT_TODO = [];
        local ($DO_QUIT, $REINDEX, $TXN_BYTES, @GIT_DIR_GONE, @PRUNE_QUEUE,
-               $GIT_TODO, $REPO_CTX, %ALT_FH, $TMPDIR, @AWK, @COMM, @SORT,
-               $PRUNE_ENV);
+               $REPO_CTX, %ALT_FH, $TMPDIR, @AWK, @COMM, @SORT, $PRUNE_ENV);
        local $BATCH_BYTES = $self->{-opt}->{batch_size} //
                                $PublicInbox::SearchIdx::BATCH_BYTES;
        local @IDX_SHARDS = cidx_init($self);