aboutsummaryrefslogtreecommitdiff
path: root/git-cvsserver.perl
diff options
context:
space:
mode:
authorFrank Lichtenheld <frank@lichtenheld.de>2007-06-15 03:01:52 +0200
committerJunio C Hamano <gitster@pobox.com>2007-06-15 22:38:45 -0700
commitfd1cd91e9407bccba3380dad6dcb60c4154d94a2 (patch)
tree133badfc7e95bba6e35177124b15fa10f53fa81d /git-cvsserver.perl
parent693b63273e05b5db4612178989271de14439b08f (diff)
downloadgit-fd1cd91e9407bccba3380dad6dcb60c4154d94a2.tar.gz
git-fd1cd91e9407bccba3380dad6dcb60c4154d94a2.tar.xz
cvsserver: Let --base-path and pserver get along just fine
Embarassing bug number one in my options patch. Since the code for --base-path support rewrote the cvsroot value after comparing it with a possible existing value (i.e. from pserver authentication) the check always failed. Signed-off-by: Frank Lichtenheld <frank@lichtenheld.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-cvsserver.perl')
-rwxr-xr-xgit-cvsserver.perl10
1 files changed, 6 insertions, 4 deletions
diff --git a/git-cvsserver.perl b/git-cvsserver.perl
index 9fbd9dbb2..f78afe812 100755
--- a/git-cvsserver.perl
+++ b/git-cvsserver.perl
@@ -212,15 +212,17 @@ sub req_Root
return 0;
}
+ my $cvsroot = $state->{'base-path'} || '';
+ $cvsroot =~ s#/+$##;
+ $cvsroot .= $data;
+
if ($state->{CVSROOT}
- && ($state->{CVSROOT} ne $data)) {
+ && ($state->{CVSROOT} ne $cvsroot)) {
print "error 1 Conflicting roots specified\n";
return 0;
}
- $state->{CVSROOT} = $state->{'base-path'} || '';
- $state->{CVSROOT} =~ s#/+$##;
- $state->{CVSROOT} .= $data;
+ $state->{CVSROOT} = $cvsroot;
$ENV{GIT_DIR} = $state->{CVSROOT} . "/";