From: Frank Lichtenheld Date: Mon, 19 Mar 2007 15:55:57 +0000 (+0100) Subject: cvsserver: Introduce new state variable 'method' X-Git-Tag: v1.5.2-rc0~34^2~11 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=80573baec4a6211fc9a01d83690c0d73015cfbdc;p=git.git cvsserver: Introduce new state variable 'method' $state->{method} contains the CVS access method used, either 'ext' or 'pserver' Signed-off-by: Frank Lichtenheld Signed-off-by: Junio C Hamano --- diff --git a/git-cvsserver.perl b/git-cvsserver.perl index 68aa75255..e9d489bc3 100755 --- a/git-cvsserver.perl +++ b/git-cvsserver.perl @@ -91,7 +91,9 @@ $log->debug("Temporary directory is '$TEMP_DIR'"); # 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 = ; chomp $line; unless( $line eq 'BEGIN AUTH REQUEST') { die "E Do not understand $line - expecting BEGIN AUTH REQUEST\n"; @@ -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;