]> git.ipfire.org Git - thirdparty/public-inbox.git/commitdiff
cindex: use `--project-list=' default with empty string
authorEric Wong <e@80x24.org>
Mon, 3 Nov 2025 02:50:07 +0000 (02:50 +0000)
committerEric Wong <e@80x24.org>
Tue, 4 Nov 2025 21:13:53 +0000 (21:13 +0000)
Matching public-inbox-clone(1) behavior, using `--project-list='
with an empty argument to mean the same thing as
`--project-list=projects.list' allows users to reduce typing and
visual noise on their displays.

script/public-inbox-cindex

index 2c504a1731091e6cc147034ecaca2aa388389293..0c8f23079fa53c4548fc38a92042db3ee70927cc 100755 (executable)
@@ -30,7 +30,7 @@ GetOptions($opt, qw(quiet|q verbose|v+ reindex jobs|j=i fsync|sync! dangerous
                commit-interval|commit=i
                batch_size|batch-size=s max_size|max-size=s
                include|I=s@ only=s@ all show:s@
-               project-list=s exclude=s@ project-root|r=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
                d=s update|u scan! prune dry-run|n C=s@ help|h))
@@ -68,6 +68,7 @@ EOM
 --project-list does not accept additional --git-dir directories
 (@{$opt->{'git-dir'}})
 EOM
+       $pl = 'projects.list' if $pl eq ''; # same as public-inbox-clone(1)
        open my $fh, '<', $pl or die "open($pl): $!\n";
        chomp(@git_dirs = <$fh>);
        $pfx .= '/';