Skip to content

Commit

Permalink
git-cvsserver: fix disabling service via per-method config
Browse files Browse the repository at this point in the history
When the per-method enable logic disables the access, we should
not even look at the global one.

 git-cvsserver.perl |    8 +++-----
 1 files changed, 3 insertions(+), 5 deletions(-)

Signed-off-by: Junio C Hamano <junkio@cox.net>
  • Loading branch information
Junio C Hamano committed May 22, 2007
1 parent f95c678 commit 523d12e
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions git-cvsserver.perl
Original file line number Diff line number Diff line change
Expand Up @@ -192,11 +192,9 @@ sub req_Root
}
}

unless ( ($cfg->{gitcvs}{$state->{method}}{enabled}
and $cfg->{gitcvs}{$state->{method}}{enabled} =~ /^\s*(1|true|yes)\s*$/i)
or ($cfg->{gitcvs}{enabled}
and $cfg->{gitcvs}{enabled} =~ /^\s*(1|true|yes)\s*$/i) )
{
my $enabled = ($cfg->{gitcvs}{$state->{method}}{enabled}
|| $cfg->{gitcvs}{enabled});
unless ($enabled && $enabled =~ /^\s*(1|true|yes)\s*$/i) {
print "E GITCVS emulation needs to be enabled on this repo\n";
print "E the repo config file needs a [gitcvs] section added, and the parameter 'enabled' set to 1\n";
print "E \n";
Expand Down

0 comments on commit 523d12e

Please sign in to comment.