From: Frank Lichtenheld Date: Mon, 19 Mar 2007 15:55:58 +0000 (+0100) Subject: cvsserver: Handle three part keys in git config correctly X-Git-Tag: v1.5.2-rc0~34^2~10 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=92a39a14d00fdfe6868bacf86cbf933a2cc6be93;p=git.git cvsserver: Handle three part keys in git config correctly This is intended to be used in the form gitcvs.. but this patch doesn't introduce any users yet. Signed-off-by: Frank Lichtenheld Signed-off-by: Junio C Hamano --- diff --git a/git-cvsserver.perl b/git-cvsserver.perl index e9d489bc3..4edb79601 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 )