From 0cd52fc7fda7557079cdbe1e107e6448e00a0ada Mon Sep 17 00:00:00 2001 From: Leah Rowe Date: Wed, 17 Jul 2024 16:55:05 +0100 Subject: git.sh: re-try git pull three times mitigate jittery internet connections Signed-off-by: Leah Rowe --- include/git.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/git.sh b/include/git.sh index 0de4c931..ba58a5ba 100644 --- a/include/git.sh +++ b/include/git.sh @@ -103,7 +103,8 @@ tmpclone() repodir="repo/${1##*/}" x_ mkdir -p "repo" if [ -d "$repodir" ]; then - git -C "$repodir" pull || : + git -C "$repodir" pull || sleep 3 || git -C "$repodir" pull \ + || sleep 3 || git -C "$repodir" pull : else git clone $1 "$repodir" || git clone $2 "$repodir" || \ $err "!clone $1 $2 $repodir $4 $5" -- cgit v1.2.1