From 03c9670fef97176df3fa64ae225873a222bc65e5 Mon Sep 17 00:00:00 2001
From: Leah Rowe <leah@libreboot.org>
Date: Wed, 17 Jul 2024 16:55:05 +0100
Subject: [PATCH] git.sh: re-try git pull three times

mitigate jittery internet connections

Signed-off-by: Leah Rowe <leah@libreboot.org>
---
 include/git.sh | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/include/git.sh b/include/git.sh
index 0de4c93..ba58a5b 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"
-- 
GitLab