Skip to content

Commit

Permalink
cvsserver: Introduce new state variable 'method'
Browse files Browse the repository at this point in the history
$state->{method} contains the CVS access method used,
either 'ext' or 'pserver'

Signed-off-by: Frank Lichtenheld <frank@lichtenheld.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
  • Loading branch information
Frank Lichtenheld authored and Junio C Hamano committed Mar 22, 2007
1 parent 1d848f6 commit 80573ba
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion git-cvsserver.perl
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,9 @@
# if we are called with a pserver argument,
# deal with the authentication cat before entering the
# main loop
$state->{method} = 'ext';
if (@ARGV && $ARGV[0] eq 'pserver') {
$state->{method} = 'pserver';
my $line = <STDIN>; chomp $line;
unless( $line eq 'BEGIN AUTH REQUEST') {
die "E Do not understand $line - expecting BEGIN AUTH REQUEST\n";
Expand Down Expand Up @@ -1026,7 +1028,7 @@ sub req_ci

$log->info("req_ci : " . ( defined($data) ? $data : "[NULL]" ));

if ( @ARGV && $ARGV[0] eq 'pserver')
if ( $state->{method} eq 'pserver')
{
print "error 1 pserver access cannot commit\n";
exit;
Expand Down

0 comments on commit 80573ba

Please sign in to comment.