mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
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 <andrew.cooper3@citrix.com> Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
This commit is contained in:
1 parent
9a2a50d5de
commit
c554ec124b
1 file changed
+1
-1
@@ -14,7 +14,7 @@ set -e
|
|||||||
if test \! -d $DIR-remote; then
|
if test \! -d $DIR-remote; then
|
||||||
rm -rf $DIR-remote $DIR-remote.tmp
|
rm -rf $DIR-remote $DIR-remote.tmp
|
||||||
mkdir -p $DIR-remote.tmp; rmdir $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
|
if test "$TAG" ; then
|
||||||
cd $DIR-remote.tmp
|
cd $DIR-remote.tmp
|
||||||
$GIT branch -D dummy >/dev/null 2>&1 ||:
|
$GIT branch -D dummy >/dev/null 2>&1 ||:
|
||||||
|
|||||||