clone_repos: Force branchname for clone_and_sync
When cloning repos, for SCP there is an option for
the refspec to be renamed to 'master-upstream' but master has
that name already. Hence force even if it already exists.
Change-Id: I609edfe2c799e4274340037517ae18041387d6f1
Co-authored-by: Nicola Mazzucato <nicola.mazzucato@arm.com>
Signed-off-by: Saul Romero <saul.romero@arm.com>
Signed-off-by: Nicola Mazzucato <nicola.mazzucato@arm.com>
diff --git a/script/clone_repos.sh b/script/clone_repos.sh
index b896cdd..3f5466a 100755
--- a/script/clone_repos.sh
+++ b/script/clone_repos.sh
@@ -179,7 +179,7 @@
# clone so that downstream jobs can clone from this one using
# the same refspec.
if echo "$refspec" | grep -qv '^[a-f0-9]\+$'; then
- git branch "$refspec" FETCH_HEAD
+ git branch -f "$refspec" FETCH_HEAD
fi
elif [ "$name" = "$repo_under_test" ]; then
# Main repository under test