chiark / gitweb /
git-urlmap: clarify comments
[userv-utils.git] / git-daemon / git-service
index 9661434cc72d2d258cb04679e772723df7f7a30d..aeb4e0e10a397e4c5e2284ba5a5faa237f747898 100755 (executable)
@@ -14,7 +14,7 @@ use Sys::Syslog;
 ${$::{$_}} = $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 }
@@ -33,7 +33,10 @@ $path = $check_export ? "$dir/git-daemon-export-ok" : $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: $!";