summaryrefslogtreecommitdiff
path: root/git-cvsserver.perl
diff options
context:
space:
mode:
authorFrank Lichtenheld <frank@lichtenheld.de>2007-03-19 16:55:58 +0100
committerJunio C Hamano <junkio@cox.net>2007-03-22 01:26:26 -0700
commit92a39a14d00fdfe6868bacf86cbf933a2cc6be93 (patch)
tree46d6cd7dac99b7457f573b3110c1ff82fd229730 /git-cvsserver.perl
parent80573baec4a6211fc9a01d83690c0d73015cfbdc (diff)
downloadgit-92a39a14d00fdfe6868bacf86cbf933a2cc6be93.tar.gz
cvsserver: Handle three part keys in git config correctly
This is intended to be used in the form gitcvs.<method>.<var> but this patch doesn't introduce any users yet. Signed-off-by: Frank Lichtenheld <frank@lichtenheld.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'git-cvsserver.perl')
-rwxr-xr-xgit-cvsserver.perl8
1 files changed, 6 insertions, 2 deletions
diff --git a/git-cvsserver.perl b/git-cvsserver.perl
index e9d489bc30..4edb796019 100755
--- a/git-cvsserver.perl
+++ b/git-cvsserver.perl
@@ -183,8 +183,12 @@ sub req_Root
}
foreach my $line ( @gitvars )
{
- next unless ( $line =~ /^(.*?)\.(.*?)=(.*)$/ );
- $cfg->{$1}{$2} = $3;
+ next unless ( $line =~ /^(.*?)\.(.*?)(?:\.(.*?))?=(.*)$/ );
+ unless ($3) {
+ $cfg->{$1}{$2} = $4;
+ } else {
+ $cfg->{$1}{$2}{$3} = $4;
+ }
}
unless ( defined ( $cfg->{gitcvs}{enabled} ) and $cfg->{gitcvs}{enabled} =~ /^\s*(1|true|yes)\s*$/i )