chiark
/
gitweb
/
~mdw
/
userv-utils
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
git-daemon: add Makefile and documentation.
[userv-utils]
/
git-daemon
/
git-service
diff --git
a/git-daemon/git-service
b/git-daemon/git-service
index 9661434cc72d2d258cb04679e772723df7f7a30d..aeb4e0e10a397e4c5e2284ba5a5faa237f747898 100755
(executable)
--- a/
git-daemon/git-service
+++ b/
git-daemon/git-service
@@
-14,7
+14,7
@@
use Sys::Syslog;
${$::{$_}} = $ENV{"USERV_U_$_"}
for grep s|^USERV_U_([a-z_]+)$|$1|, keys %ENV;
${$::{$_}} = $ENV{"USERV_U_$_"}
for grep s|^USERV_U_([a-z_]+)$|$1|, keys %ENV;
-our ($client,$service,$path,$host);
+our ($client,$service,$path,$host
,@opts
);
openlog "userv-$service", 'pid', 'daemon';
sub fail { syslog 'err', "$client @_"; exit }
openlog "userv-$service", 'pid', 'daemon';
sub fail { syslog 'err', "$client @_"; exit }
@@
-33,7
+33,10
@@
$path = $check_export ? "$dir/git-daemon-export-ok" : $dir;
fail "$! $path" unless -e $path;
syslog 'notice', "$client $dir";
fail "$! $path" unless -e $path;
syslog 'notice', "$client $dir";
-my @cmd = ($service =~ m|^(git)-(.*)$|, '--strict', '--timeout=30', $dir);
+@opts = qw( --strict --timeout-30 )
+ if @opts == 0 and $service eq 'git-upload-pack';
+
+my @cmd = ($service =~ m|^(git)-(.*)$|, @opts, $dir);
no warnings; # suppress errors to stderr
exec @cmd or fail "exec $service: $!";
no warnings; # suppress errors to stderr
exec @cmd or fail "exec $service: $!";