From: Eric Wong Date: Mon, 3 Nov 2025 02:50:10 +0000 (+0000) Subject: cindex: clarify yet-to-be-documented switches X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=098f70cf0f2b6a2515d5a0dee43d29e9a3c011c3;p=thirdparty%2Fpublic-inbox.git cindex: clarify yet-to-be-documented switches 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. --- diff --git a/lib/PublicInbox/CodeSearchIdx.pm b/lib/PublicInbox/CodeSearchIdx.pm index 27464300c..8bfed0ca1 100644 --- a/lib/PublicInbox/CodeSearchIdx.pm +++ b/lib/PublicInbox/CodeSearchIdx.pm @@ -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 <{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); diff --git a/script/public-inbox-cindex b/script/public-inbox-cindex index 0c8f23079..f287253a2 100755 --- a/script/public-inbox-cindex +++ b/script/public-inbox-cindex @@ -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