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>
This commit is contained in:

committed by
Junio C Hamano

parent
693b63273e
commit
fd1cd91e94
@ -212,15 +212,17 @@ sub req_Root
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
my $cvsroot = $state->{'base-path'} || '';
|
||||||
|
$cvsroot =~ s#/+$##;
|
||||||
|
$cvsroot .= $data;
|
||||||
|
|
||||||
if ($state->{CVSROOT}
|
if ($state->{CVSROOT}
|
||||||
&& ($state->{CVSROOT} ne $data)) {
|
&& ($state->{CVSROOT} ne $cvsroot)) {
|
||||||
print "error 1 Conflicting roots specified\n";
|
print "error 1 Conflicting roots specified\n";
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
$state->{CVSROOT} = $state->{'base-path'} || '';
|
$state->{CVSROOT} = $cvsroot;
|
||||||
$state->{CVSROOT} =~ s#/+$##;
|
|
||||||
$state->{CVSROOT} .= $data;
|
|
||||||
|
|
||||||
$ENV{GIT_DIR} = $state->{CVSROOT} . "/";
|
$ENV{GIT_DIR} = $state->{CVSROOT} . "/";
|
||||||
|
|
||||||
|
@ -163,6 +163,7 @@ BEGIN AUTH REQUEST
|
|||||||
anonymous
|
anonymous
|
||||||
|
|
||||||
END AUTH REQUEST
|
END AUTH REQUEST
|
||||||
|
Root /gitcvs.git
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
test_expect_success 'req_Root (base-path)' \
|
test_expect_success 'req_Root (base-path)' \
|
||||||
|
Reference in New Issue
Block a user