chiark
/
gitweb
/
~ian
/
chiark-utils.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fishdescriptor: bugfixes
[chiark-utils.git]
/
scripts
/
git-cache-proxy
diff --git
a/scripts/git-cache-proxy
b/scripts/git-cache-proxy
index 3e57a4f5530e2971794dd3a82612590421624c8e..52e01d0203b0e210200119cb42b57eea76ff7dbb 100755
(executable)
--- a/
scripts/git-cache-proxy
+++ b/
scripts/git-cache-proxy
@@
-30,6
+30,7
@@
# git-cache-proxy
# Copyright 2010 Tony Finch
# Copyright 2013,2014 Ian Jackson
# git-cache-proxy
# Copyright 2010 Tony Finch
# Copyright 2013,2014 Ian Jackson
+# Copyright 2017 Citrix
#
# git-cache-proxy is free software; you can redistribute it and/or
# modify them under the terms of the GNU General Public License as
#
# git-cache-proxy is free software; you can redistribute it and/or
# modify them under the terms of the GNU General Public License as
@@
-64,8
+65,9
@@
our $us = 'git-cache-proxy';
our $debug = 0;
our $housekeepingeverydays = 1;
our $treeexpiredays = 21;
our $debug = 0;
our $housekeepingeverydays = 1;
our $treeexpiredays = 21;
-our $fetchtimeout = 1800;
-our $maxfetchtimeout = 3600;
+our $fetchtimeout = 3600;
+our $maxfetchtimeout = 7200;
+our $servetimeout = 3600;
our $cachedir = '/var/cache/git-cache-proxy';
our $housekeepingonly = 0;
our $cachedir = '/var/cache/git-cache-proxy';
our $housekeepingonly = 0;
@@
-171,6
+173,7
@@
for (;;) {
$cachedir = $1;
} elsif (s/^--( max-fetch-timeout
| fetch-timeout
$cachedir = $1;
} elsif (s/^--( max-fetch-timeout
| fetch-timeout
+ | serve-timeout
| tree-expire-days
| housekeeping-interval-days
)=(\d+)$//x) {
| tree-expire-days
| housekeeping-interval-days
)=(\d+)$//x) {
@@
-360,6
+363,7
@@
sub clonefetch () {
servinfo "fetch/clone failed: $fetchfail";
}
}
servinfo "fetch/clone failed: $fetchfail";
}
}
+ alarm 0;
if (!$exists) {
rename $tmpd, $gitd or fail "rename fresh $tmpd to $gitd: $!";
if (!$exists) {
rename $tmpd, $gitd or fail "rename fresh $tmpd to $gitd: $!";
@@
-475,7
+479,7
@@
sub runcommand () {
chdir $gitd or fail "chdir $gitd: $!";
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: $!";
}
or fail "exec git-upload-pack: $!";
}