gitolite/src/triggers/post-compile/update-git-configs
Sitaram Chamarty 057506b73f remove quotes around option values
for example, this now works (it used to save the quotes also)

    option mirror.master = "ilh-95"
2012-04-06 17:26:27 +05:30

34 lines
849 B
Perl
Executable file

#!/usr/bin/perl
# update git-config entries in each repo
# ----------------------------------------------------------------------
use FindBin;
use lib $ENV{GL_BINDIR};
use Gitolite::Rc;
use Gitolite::Common;
use Gitolite::Conf::Load;
use strict;
use warnings;
# ----------------------------------------------------------------------
my $RB = $rc{GL_REPO_BASE};
_chdir($RB);
my $lpr = list_phy_repos();
for my $pr (@$lpr) {
my $gc = git_config( $pr, '.' );
while ( my ( $key, $value ) = each( %{$gc} ) ) {
next if $key =~ /^gitolite-options\./;
if ( $value ne "" ) {
$value =~ s/%GL_REPO/$pr/g;
system( "git", "config", "--file", "$RB/$pr.git/config", $key, $value );
} else {
system( "git", "config", "--file", "$RB/$pr.git/config", "--unset-all", $key );
}
}
}