Merge pull request 'lib: retry git fetch a few times' (#178) from earl-warren/end-to-end:wip-codeberg-retry into main
Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/178 Reviewed-by: thefox <thefox@noreply.code.forgejo.org>
This commit is contained in:
commit
56fb137646
1 changed files with 5 additions and 0 deletions
|
|
@ -25,6 +25,11 @@ fi
|
|||
if ! [[ "$ref" =~ ^refs/ ]] ; then
|
||||
ref=refs/heads/$ref
|
||||
fi
|
||||
for retry in 1 2 3 ; do
|
||||
timeout 15m git fetch --update-head-ok origin +$ref:$ref && break
|
||||
echo "Retry git fetch in 60 seconds"
|
||||
sleep 60
|
||||
done
|
||||
git fetch --update-head-ok origin +$ref:$ref
|
||||
git switch --force-create $v $ref
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue