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>
Junio C Hamano committed
May 20, 2007 at 17:57 UTC
523d12e5003eee0c2cb670b51e39d719cd56aacd
1 file changed
+3
-5
git-cvsserver.perl
+3
-5
@@ -192,11 +192,9 @@ sub req_Root
192
}
193
}
194
195
- unless ( ($cfg->{gitcvs}{$state->{method}}{enabled}
196
- and $cfg->{gitcvs}{$state->{method}}{enabled} =~ /^\s*(1|true|yes)\s*$/i)
197
- or ($cfg->{gitcvs}{enabled}
198
- and $cfg->{gitcvs}{enabled} =~ /^\s*(1|true|yes)\s*$/i) )
199
- {
195
+ my $enabled = ($cfg->{gitcvs}{$state->{method}}{enabled}
196
+ || $cfg->{gitcvs}{enabled});
197
+ unless ($enabled && $enabled =~ /^\s*(1|true|yes)\s*$/i) {
198
print "E GITCVS emulation needs to be enabled on this repo\n";
199
print "E the repo config file needs a [gitcvs] section added, and the parameter 'enabled' set to 1\n";
200
print "E \n";