Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
cvsserver: Introduce new state variable 'method'
author
Frank Lichtenheld
<frank@lichtenheld.de>
Mon, 19 Mar 2007 15:55:57 +0000
(16:55 +0100)
committer
Junio C Hamano
<junkio@cox.net>
Thu, 22 Mar 2007 08:26:26 +0000
(
01:26
-0700)
$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>
git-cvsserver.perl
patch
|
blob
|
history
raw
|
patch
|
inline
| side by side (parent:
1d848f6
)
diff --git
a/git-cvsserver.perl
b/git-cvsserver.perl
index 68aa75255e21ff8231fe2f54e5772f8cbb026fce..e9d489bc3012425f38113015dca4625548f81449 100755
(executable)
--- a/
git-cvsserver.perl
+++ b/
git-cvsserver.perl
@@
-91,7
+91,9
@@
# if we are called with a pserver argument,
# deal with the authentication cat before entering the
# main loop
# 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') {
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";
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]" ));
$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;
{
print "error 1 pserver access cannot commit\n";
exit;