]> git.ipfire.org Git - thirdparty/public-inbox.git/commitdiff
cindex: clarify yet-to-be-documented switches
authorEric Wong <e@80x24.org>
Mon, 3 Nov 2025 02:50:10 +0000 (02:50 +0000)
committerEric Wong <e@80x24.org>
Tue, 4 Nov 2025 21:13:56 +0000 (21:13 +0000)
We need to clarify --all, --include=, --only= switches were only
intended for inboxes, especially since the --exclude= switch
exists for excluding coderepo pathames.  So suffix them
appropriately with `-inbox(es)'.

I'm not sure if these switches are even useful, so we'll leave
them undocumented for now.

lib/PublicInbox/CodeSearchIdx.pm
script/public-inbox-cindex

index 27464300c9b6c3d7c9edcabe6cf0dffdcf69c5fa..8bfed0ca173e9f16e59e881c3bcc5ec6418f2af8 100644 (file)
@@ -1234,18 +1234,19 @@ EOM
                        warn "W: `$_' is not a public inbox, skipping\n";
                        ();
                }
-       } (@{$self->{-opt}->{include} // []});
-       my $all = $self->{-opt}->{all};
-       if (my $only = $self->{-opt}->{only}) {
+       } (@{$self->{-opt}->{'include-inbox'} // []});
+       my $all = $self->{-opt}->{'all-inboxes'};
+       if (my $only = $self->{-opt}->{'only-inbox'}) {
                die <<'' if $all;
-E: --all is incompatible with --only
+E: --all-inboxes is incompatible with --only-inbox
 
                $incl{rel2abs_collapsed($_)} = undef for @$only;
        }
        unless (keys(%incl)) {
                $all = 1;
                warn <<EOM unless $self->{opt}->{quiet};
-# --all implied since no inboxes were specified with --only or --include
+# --all-inboxes implied since no inboxes were specified with
+# --only-inbox= or --include-inbox=
 EOM
        }
        $self->{-opt}->{-pi_cfg}->each_inbox(\&_prep_ibx, $self, \%incl, $all);
index 0c8f23079fa53c4548fc38a92042db3ee70927cc..f287253a27c3b4574cf7cb457c923ca4c9eff77b 100755 (executable)
@@ -29,7 +29,7 @@ GetOptions($opt, qw(quiet|q verbose|v+ reindex jobs|j=i fsync|sync! dangerous
                cow! indexlevel|index-level|L=s join:s@
                commit-interval|commit=i
                batch_size|batch-size=s max_size|max-size=s
-               include|I=s@ only=s@ all show:s@
+               include-inbox|I=s@ only-inbox=s@ all-inboxes show:s@
                project-list|projectslist=s exclude=s@ project-root|r=s
                git-dir|g=s@
                sort-parallel=s sort-compress-program=s sort-buffer-size=s