Skip to content

Commit

Permalink
cvsserver: Handle three part keys in git config correctly
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Frank Lichtenheld authored and Junio C Hamano committed Mar 22, 2007
1 parent 80573ba commit 92a39a1
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions git-cvsserver.perl
Original file line number Diff line number Diff line change
Expand Up @@ -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 )
Expand Down

0 comments on commit 92a39a1

Please sign in to comment.