Merge "fix git_timed retry logic"
This commit is contained in:
commit
edd6e518b5
@ -19,14 +19,7 @@ function git_timed {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
until timeout -s SIGINT ${timeout} git "$@"; do
|
until timeout -s SIGINT ${timeout} git "$@"; do
|
||||||
# 124 is timeout(1)'s special return code when it reached the
|
echo "Command exited with '$?' [git $@] ... retrying"
|
||||||
# timeout; otherwise assume fatal failure
|
|
||||||
if [[ $? -ne 124 ]]; then
|
|
||||||
exitcode=$?
|
|
||||||
echo $LINENO "git call failed: [git $@]"
|
|
||||||
exit $exitcode
|
|
||||||
fi
|
|
||||||
|
|
||||||
count=$(($count + 1))
|
count=$(($count + 1))
|
||||||
echo "timeout ${count} for git call: [git $@]"
|
echo "timeout ${count} for git call: [git $@]"
|
||||||
if [ $count -eq 3 ]; then
|
if [ $count -eq 3 ]; then
|
||||||
|
Loading…
Reference in New Issue
Block a user