summaryrefslogtreecommitdiff
path: root/git-cvsserver.perl
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2007-05-20 17:57:27 -0700
committerJunio C Hamano <junkio@cox.net>2007-05-21 18:42:57 -0700
commit523d12e5003eee0c2cb670b51e39d719cd56aacd (patch)
tree166c5b16306841c2a3adf9cdbd40ae9c6e74a637 /git-cvsserver.perl
parentf95c6780c244e90abf87222126ad3b4bb18a504e (diff)
downloadgit-523d12e5003eee0c2cb670b51e39d719cd56aacd.tar.gz
git-cvsserver: fix disabling service via per-method config
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>
Diffstat (limited to 'git-cvsserver.perl')
-rwxr-xr-xgit-cvsserver.perl8
1 files changed, 3 insertions, 5 deletions
diff --git a/git-cvsserver.perl b/git-cvsserver.perl
index fcfb99db65..1de517791f 100755
--- a/git-cvsserver.perl
+++ b/git-cvsserver.perl
@@ -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";