Merge "add git timeout setting for clone_repo.sh"

This commit is contained in:
Zuul 2018-02-06 05:34:58 +00:00 committed by Gerrit Code Review
commit a53d519c90
1 changed files with 8 additions and 1 deletions

View File

@ -67,8 +67,10 @@ CACHE_DIR="${ZUUL_CACHE_DIR:-/opt/git}"
BRANCH="master"
REF=""
UPSTREAM="https://git.openstack.org"
export GIT_HTTP_LOW_SPEED_TIME=300
export GIT_HTTP_LOW_SPEED_LIMIT=1000
OPTS=`getopt -o h --long branch:,cache-dir:,ref:,upstream:,workspace: -n $0 -- "$@"`
OPTS=`getopt -o h --long branch:,cache-dir:,ref:,timeout:,upstream:,workspace: -n $0 -- "$@"`
if [ $? != 0 ] ; then
echo "Failed parsing options." >&2
print_help
@ -96,6 +98,11 @@ while true; do
shift
shift
;;
--timeout)
GIT_HTTP_LOW_SPEED_TIME="$2"
shift
shift
;;
--upstream)
UPSTREAM="$2"
shift