summaryrefslogtreecommitdiff
path: root/src/commands/info
diff options
context:
space:
mode:
authorDavid Bremner <david@tethera.net>2018-09-15 12:35:56 -0300
committerDavid Bremner <david@tethera.net>2018-09-15 12:35:56 -0300
commit518e6f1ad5bd9ea43609f29e5ddac025e6652865 (patch)
tree4ff1b80de9c6c0508122cdaafe5585a250cf53a1 /src/commands/info
parent2837fcd4f1514f3fb29d0f6e11733c4b09409d75 (diff)
parent6a67ca1ab46267e2f7ceb5919fbbbf167f474dd8 (diff)
Merge tag 'upstream/3.6.9' into debian
merged from github
Diffstat (limited to 'src/commands/info')
-rwxr-xr-xsrc/commands/info16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/commands/info b/src/commands/info
index 5079cfa..b88e288 100755
--- a/src/commands/info
+++ b/src/commands/info
@@ -12,12 +12,13 @@ use Gitolite::Conf::Load;
=for args
Usage: gitolite info [-lc] [-ld] [-json] [<repo name pattern>]
-List all existing repos you can access, as well as repo name patterns you can
-create repos from (if any).
+List all existing repos you can access, as well as repo name patterns (see
+"wild repos") you have any kind of access to.
'-lc' lists creators as an additional field at the end.
'-ld' lists description as an additional field at the end.
'-json' produce JSON output instead of normal output
+ '-p' limits output to physical repos only (no wild repo regexes!)
The optional pattern is an unanchored regex that will limit the repos
searched, in both cases. It might speed up things a little if you have more
@@ -25,7 +26,7 @@ than a few thousand repos.
=cut
# these are globals
-my ( $lc, $ld, $json, $patt ) = args();
+my ( $lc, $ld, $json, $p, $patt ) = args();
my %out; # holds info to be json'd
$ENV{GL_USER} or _die "GL_USER not set";
@@ -35,8 +36,8 @@ if ($json) {
print greeting();
}
-print_patterns(); # repos he can create for himself
-print_phy_repos(); # repos already created
+print_patterns() unless $p; # repos he can create for himself
+print_phy_repos(); # repos already created
if ( $rc{SITE_INFO} ) {
$json
@@ -49,13 +50,14 @@ print JSON::to_json( \%out, { utf8 => 1, pretty => 1 } ) if $json;
# ----------------------------------------------------------------------
sub args {
- my ( $lc, $ld, $json, $patt ) = ( '', '', '', '' );
+ my ( $lc, $ld, $json, $p, $patt ) = ( '', '', '', '' );
my $help = '';
GetOptions(
'lc' => \$lc,
'ld' => \$ld,
'json' => \$json,
+ 'p' => \$p,
'h' => \$help,
) or usage();
@@ -64,7 +66,7 @@ sub args {
require JSON if $json;
- return ( $lc, $ld, $json, $patt );
+ return ( $lc, $ld, $json, $p, $patt );
}
sub print_patterns {