From c554ec124b12f9c0d8bfb2b564ca239bd676037c Mon Sep 17 00:00:00 2001 From: Andrew Cooper Date: Wed, 30 Oct 2024 19:03:42 +0000 Subject: [PATCH] scripts: Fix git-checkout.sh to work with branches other than master Xen uses master for QEMU_UPSTREAM_REVISION, and has done for other trees too in the path. Apparently we've never specified a different branch, because the git-clone rune only pulls in the master branch; it does not pull in diverging branches. Fix this by stating which branch/tag is wanted. $TAG is really a committish, and git-clone's -b/--branch takes a committish too. Signed-off-by: Andrew Cooper Reviewed-by: Stefano Stabellini --- scripts/git-checkout.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/git-checkout.sh b/scripts/git-checkout.sh index fd4425ac4e..3796cbfe39 100755 --- a/scripts/git-checkout.sh +++ b/scripts/git-checkout.sh @@ -14,7 +14,7 @@ set -e if test \! -d $DIR-remote; then rm -rf $DIR-remote $DIR-remote.tmp mkdir -p $DIR-remote.tmp; rmdir $DIR-remote.tmp - $GIT clone $TREE $DIR-remote.tmp + $GIT clone -b $TAG $TREE $DIR-remote.tmp if test "$TAG" ; then cd $DIR-remote.tmp $GIT branch -D dummy >/dev/null 2>&1 ||: -- 2.39.5