remove quotes around option values
for example, this now works (it used to save the quotes also) option mirror.master = "ilh-95"
This commit is contained in:
parent
e1c7e546aa
commit
057506b73f
|
@ -58,6 +58,7 @@ sub parse {
|
||||||
}
|
}
|
||||||
} elsif ( $line =~ /^config (.+) = ?(.*)/ ) {
|
} elsif ( $line =~ /^config (.+) = ?(.*)/ ) {
|
||||||
my ( $key, $value ) = ( $1, $2 );
|
my ( $key, $value ) = ( $1, $2 );
|
||||||
|
$value =~ s/^['"](.*)["']$/$1/;
|
||||||
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;
|
||||||
|
|
|
@ -24,7 +24,6 @@ for my $pr (@$lpr) {
|
||||||
while ( my ( $key, $value ) = each( %{$gc} ) ) {
|
while ( my ( $key, $value ) = each( %{$gc} ) ) {
|
||||||
next if $key =~ /^gitolite-options\./;
|
next if $key =~ /^gitolite-options\./;
|
||||||
if ( $value ne "" ) {
|
if ( $value ne "" ) {
|
||||||
$value =~ s/^['"](.*)["']$/$1/;
|
|
||||||
$value =~ s/%GL_REPO/$pr/g;
|
$value =~ s/%GL_REPO/$pr/g;
|
||||||
system( "git", "config", "--file", "$RB/$pr.git/config", $key, $value );
|
system( "git", "config", "--file", "$RB/$pr.git/config", $key, $value );
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue