summaryrefslogtreecommitdiff
path: root/git-cvsserver.perl
diff options
context:
space:
mode:
authorFrank Lichtenheld <frank@lichtenheld.de>2007-03-19 15:55:57 (GMT)
committerJunio C Hamano <junkio@cox.net>2007-03-22 08:26:26 (GMT)
commit80573baec4a6211fc9a01d83690c0d73015cfbdc (patch)
tree394ebd1fc892ba6ff66741d757d3ae2a2bce5bef /git-cvsserver.perl
parent1d848f643cd8ba86044d729d08d6866425c1539e (diff)
downloadgit-80573baec4a6211fc9a01d83690c0d73015cfbdc.zip
git-80573baec4a6211fc9a01d83690c0d73015cfbdc.tar.gz
git-80573baec4a6211fc9a01d83690c0d73015cfbdc.tar.bz2
cvsserver: Introduce new state variable 'method'
$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>
Diffstat (limited to 'git-cvsserver.perl')
-rwxr-xr-xgit-cvsserver.perl4
1 files changed, 3 insertions, 1 deletions
diff --git a/git-cvsserver.perl b/git-cvsserver.perl
index 68aa752..e9d489b 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 = <STDIN>; 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;