From 4fc8532d72a9fbe5080cae54e01ea4d6c63ee1b0 Mon Sep 17 00:00:00 2001 From: Michal Jenikovsky Date: Tue, 2 Jul 2024 00:29:25 +0200 Subject: [PATCH] scripts: fixed updating repo to source ref Signed-off-by: Michal Jenikovsky --- scripts/001-binutils.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/001-binutils.sh b/scripts/001-binutils.sh index 3ac1682..d288df8 100755 --- a/scripts/001-binutils.sh +++ b/scripts/001-binutils.sh @@ -25,9 +25,9 @@ fi if test ! -d "$REPO_FOLDER"; then git clone --depth 1 -b "$REPO_REF" "$REPO_URL" "$REPO_FOLDER" else - git -C "$REPO_FOLDER" fetch origin - git -C "$REPO_FOLDER" reset --hard "origin/$REPO_REF" - git -C "$REPO_FOLDER" checkout "$REPO_REF" + git -C "$REPO_FOLDER" remote set-url origin "$REPO_URL" + git -C "$REPO_FOLDER" fetch origin "$REPO_REF" --depth=1 + git -C "$REPO_FOLDER" checkout -f "$REPO_REF" fi cd "$REPO_FOLDER"