From 0eac102971c0e1e10bd7da9a35a8862c686094fb Mon Sep 17 00:00:00 2001
From: Matthias Schiffer <mschiffer@universe-factory.net>
Date: Fri, 12 Aug 2016 09:23:07 +0200
Subject: [PATCH] scripts/update.sh: fix checkout of correct base commit after
 fetching

---
 scripts/update.sh | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/scripts/update.sh b/scripts/update.sh
index 8aa987315..fcdff3a9f 100755
--- a/scripts/update.sh
+++ b/scripts/update.sh
@@ -16,5 +16,8 @@ for module in $GLUON_MODULES; do
 	git init
 	git config commit.gpgsign false
 
-	git branch -f base $commit 2>/dev/null || git fetch -f $repo $branch:base
+	if ! git branch -f base $commit 2>/dev/null; then
+		git fetch $repo $branch
+		git branch -f base $commit 2>/dev/null
+	fi
 done
-- 
GitLab