1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-05-06 21:36:12 +02:00

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>
This commit is contained in:
Frank Lichtenheld 2007-03-19 16:55:58 +01:00 committed by Junio C Hamano
parent 80573baec4
commit 92a39a14d0

View File

@ -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 )