(minor)
trace rationalisation plus perltidy again
This commit is contained in:
parent
89a1857d56
commit
9650d2fb3f
|
@ -63,7 +63,7 @@ sub parse {
|
||||||
my @validkeys = split( ' ', ( $rc{GIT_CONFIG_KEYS} || '' ) );
|
my @validkeys = split( ' ', ( $rc{GIT_CONFIG_KEYS} || '' ) );
|
||||||
push @validkeys, "gitolite-options\\..*";
|
push @validkeys, "gitolite-options\\..*";
|
||||||
my @matched = grep { $key =~ /^$_$/ } @validkeys;
|
my @matched = grep { $key =~ /^$_$/ } @validkeys;
|
||||||
_die "git config $key not allowed\ncheck GIT_CONFIG_KEYS in the rc file" if (@matched < 1);
|
_die "git config $key not allowed\ncheck GIT_CONFIG_KEYS in the rc file" if ( @matched < 1 );
|
||||||
_die "bad value '$value'" if $value =~ $UNSAFE_PATT;
|
_die "bad value '$value'" if $value =~ $UNSAFE_PATT;
|
||||||
add_config( 1, $key, $value );
|
add_config( 1, $key, $value );
|
||||||
} elsif ( $line =~ /^subconf (\S+)$/ ) {
|
} elsif ( $line =~ /^subconf (\S+)$/ ) {
|
||||||
|
|
|
@ -126,6 +126,7 @@ sub git_config {
|
||||||
# and the final map does this:
|
# and the final map does this:
|
||||||
# 'foo.bar'=>'repo' , 'foodbar'=>'repoD'
|
# 'foo.bar'=>'repo' , 'foodbar'=>'repoD'
|
||||||
|
|
||||||
|
trace( 3, map { ( "$_" => "-> $ret{$_}" ) } ( sort keys %ret ) );
|
||||||
return \%ret;
|
return \%ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -165,7 +166,7 @@ sub load_1 {
|
||||||
trace( 3, $repo );
|
trace( 3, $repo );
|
||||||
|
|
||||||
if ( repo_missing($repo) ) {
|
if ( repo_missing($repo) ) {
|
||||||
trace( 3, "repo '$repo' missing" );
|
trace( 2, "repo '$repo' missing" );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
_chdir("$rc{GL_REPO_BASE}/$repo.git");
|
_chdir("$rc{GL_REPO_BASE}/$repo.git");
|
||||||
|
@ -237,6 +238,7 @@ sub memberships {
|
||||||
my $type = shift;
|
my $type = shift;
|
||||||
my $item = shift;
|
my $item = shift;
|
||||||
my $item2 = '';
|
my $item2 = '';
|
||||||
|
trace( 3, $type, $item );
|
||||||
|
|
||||||
my @ret = ( $item, '@all' );
|
my @ret = ( $item, '@all' );
|
||||||
|
|
||||||
|
@ -263,6 +265,7 @@ sub memberships {
|
||||||
}
|
}
|
||||||
|
|
||||||
@ret = @{ sort_u( \@ret ) };
|
@ret = @{ sort_u( \@ret ) };
|
||||||
|
trace( 3, sort @ret );
|
||||||
return @ret;
|
return @ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -13,11 +13,11 @@ Prints a list of custom commands available at this gitolite installation.
|
||||||
=cut
|
=cut
|
||||||
|
|
||||||
my $user = $ENV{GL_USER} || '';
|
my $user = $ENV{GL_USER} || '';
|
||||||
print "hello" . ( $user ? " $user" : "") . ", this is gitolite3 " . version() . " on git " . substr( `git --version`, 12 ) . "\n";
|
print "hello" . ( $user ? " $user" : "" ) . ", this is gitolite3 " . version() . " on git " . substr( `git --version`, 12 ) . "\n";
|
||||||
|
|
||||||
_chdir("$ENV{GL_BINDIR}/commands");
|
_chdir("$ENV{GL_BINDIR}/commands");
|
||||||
|
|
||||||
print "list of " . ($user ? "remote" : "gitolite" ) . " commands available:\n\n";
|
print "list of " . ( $user ? "remote" : "gitolite" ) . " commands available:\n\n";
|
||||||
|
|
||||||
for my $c (`find . -type f|sort`) {
|
for my $c (`find . -type f|sort`) {
|
||||||
chomp($c);
|
chomp($c);
|
||||||
|
|
|
@ -123,5 +123,7 @@ sub run_all {
|
||||||
_system( $sfp, @ARGV ); # they better all return with 0 exit codes!
|
_system( $sfp, @ARGV ); # they better all return with 0 exit codes!
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
trace( 2, "'$rc_section' not found in rc" );
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue