aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/commands')
-rwxr-xr-xsrc/commands/access2
-rwxr-xr-xsrc/commands/perms6
-rwxr-xr-xsrc/commands/sshkeys-lint14
-rwxr-xr-xsrc/commands/who-pushed5
4 files changed, 10 insertions, 17 deletions
diff --git a/src/commands/access b/src/commands/access
index c342949..4209b7e 100755
--- a/src/commands/access
+++ b/src/commands/access
@@ -41,7 +41,7 @@ Notes:
the username and use ^C as the permission to check for.
=cut
-usage() if not @ARGV or $h;
+usage() if not @ARGV >= 2 or $h;
my ( $repo, $user, $aa, $ref ) = @ARGV;
# default access is '+'
diff --git a/src/commands/perms b/src/commands/perms
index 30984bf..66ae885 100755
--- a/src/commands/perms
+++ b/src/commands/perms
@@ -53,8 +53,10 @@ if ( $ARGV[0] eq '-c' ) {
_die "invalid repo '$repo'" unless $repo =~ $REPONAME_PATT;
if ( not -d "$rc{GL_REPO_BASE}/$repo.git" ) {
- my $ret = Gitolite::Conf::Load::access( $repo, $ENV{GL_USER}, '^C', 'any' );
- _die $generic_error if $ret =~ /DENIED/;
+ unless ($ENV{GL_BYPASS_CREATOR_CHECK}) {
+ my $ret = Gitolite::Conf::Load::access( $repo, $ENV{GL_USER}, '^C', 'any' );
+ _die $generic_error if $ret =~ /DENIED/;
+ }
require Gitolite::Conf::Store;
Gitolite::Conf::Store->import;
diff --git a/src/commands/sshkeys-lint b/src/commands/sshkeys-lint
index 760b3d7..b67e77d 100755
--- a/src/commands/sshkeys-lint
+++ b/src/commands/sshkeys-lint
@@ -21,13 +21,6 @@ my $in_gl_section = 0;
my $warnings = 0;
my $KEYTYPE_REGEX = qr/\b(?:ssh-(?:rsa|dss|ed25519)|ecdsa-sha2-nistp(?:256|384|521))\b/;
-sub dbg {
- use Data::Dumper;
- for my $i (@_) {
- print STDERR "DBG: " . Dumper($i);
- }
-}
-
sub msg {
my $warning = shift;
return if $quiet and not $warning;
@@ -163,8 +156,7 @@ sub fprint {
}
# ------------------------------------------------------------------------
-sub usage {
- print <<EOF;
+=for usage
Usage: gitolite sshkeys-lint [-q] [optional list of pubkey filenames]
(optionally, STDIN can be a pipe or redirected from a file; see below)
@@ -183,6 +175,4 @@ Note that this runs ssh-keygen -l for each line in the authkeys file and each
pubkey in the argument list, so be wary of running it on something huge. This
is meant for troubleshooting.
-EOF
- exit 1;
-}
+=cut
diff --git a/src/commands/who-pushed b/src/commands/who-pushed
index fb37607..e59a750 100755
--- a/src/commands/who-pushed
+++ b/src/commands/who-pushed
@@ -5,6 +5,7 @@ use warnings;
use lib $ENV{GL_LIBDIR};
use Gitolite::Easy;
+usage() if not @ARGV;
usage($ARGV[1]) if $ARGV[1] and $ARGV[1] =~ /^[\w-]+$/ and $ARGV[0] eq '-h';
( my $logdir = $ENV{GL_LOGFILE} ) =~ s(/[^/]+$)();
@@ -23,7 +24,7 @@ if ($ARGV[0] eq '--tip') {
}
# the normal who-pushed
-usage() if not @ARGV or @ARGV < 2 or $ARGV[0] eq '-h';
+usage() if @ARGV < 2 or $ARGV[0] eq '-h';
usage() if $ARGV[1] !~ /^[0-9a-f]+$/i;
my $repo = shift;
@@ -121,7 +122,7 @@ sub flush_gl_log {
__END__
=for usage
-uSAge: ssh git@host who-pushed [--tip] <repo> <SHA>
+usage: ssh git@host who-pushed [--tip] <repo> <SHA>
Determine who pushed the given commit. The first few hex digits of the SHA
should suffice. If the '--tip' option is supplied, it'll only look for the