From 2b42677fc027af957b8622b38da698c4f50f41ae Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Mon, 8 May 2017 17:20:39 +0100 Subject: [PATCH] git-cache-proxy: New --serve-timeout option. Signed-off-by: Ian Jackson --- debian/changelog | 5 ++++- scripts/git-cache-proxy | 4 +++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 7be9019..c2dbeb9 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,9 +1,12 @@ -chiark-utils (5.0.3~iwj) unstable; urgency=medium +chiark-utils (5.0.3~citrix2) unstable; urgency=medium with-lock-ex: * Switch to using getopt. * New -t (timeout) option. Closes:#858555. + git-cache-proxy: + * New --serve-timeout option. + Copyright faff: * Add DEVELOPER-CERTIFICATE file and start using S-o-b practice. * Convert with-lock-ex to MIT, since the PD dedication is not diff --git a/scripts/git-cache-proxy b/scripts/git-cache-proxy index 647f6b6..ffdf6ea 100755 --- a/scripts/git-cache-proxy +++ b/scripts/git-cache-proxy @@ -67,6 +67,7 @@ our $housekeepingeverydays = 1; our $treeexpiredays = 21; our $fetchtimeout = 1800; our $maxfetchtimeout = 3600; +our $servetimeout = 1000; our $cachedir = '/var/cache/git-cache-proxy'; our $housekeepingonly = 0; @@ -172,6 +173,7 @@ for (;;) { $cachedir = $1; } elsif (s/^--( max-fetch-timeout | fetch-timeout + | serve-timeout | tree-expire-days | housekeeping-interval-days )=(\d+)$//x) { @@ -477,7 +479,7 @@ sub runcommand () { chdir $gitd or fail "chdir $gitd: $!"; - exec qw(git-upload-pack --strict --timeout=1000 .) + exec qw(git-upload-pack --strict), "--timeout=$servetimeout", qw(.) or fail "exec git-upload-pack: $!"; } -- 2.30.2