]> xenbits.xensource.com Git - xen.git/commitdiff
Make sure git clone gets the right kernel branch
authorKeir Fraser <keir.fraser@citrix.com>
Tue, 4 May 2010 11:16:37 +0000 (12:16 +0100)
committerKeir Fraser <keir.fraser@citrix.com>
Tue, 4 May 2010 11:16:37 +0000 (12:16 +0100)
When cloning kernel repo:
  1. make remote called "xen" rather than the default "origin"
  2. directly checkout the desired branch, rather than the default
  then the desired one

Git 1.5 doesn't support -b on git clone, and seems to do something odd
with the checkout branch argument, so avoid using the newer
commandline options.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
buildconfigs/src.git-clone

index b8712026890afbf238dd78d7d8975a13ba4a35c0..cc918e740818d2cbbbb68b6d4d3256ef5f27ee27 100644 (file)
@@ -23,9 +23,8 @@ $(LINUX_SRCDIR)/.valid-src: $(__XEN_LINUX_UPDATE)
        if ! [ -d $(LINUX_SRCDIR) ]; then \
                rm -rf $(LINUX_SRCDIR) $(LINUX_SRCDIR).tmp; \
                mkdir $(LINUX_SRCDIR).tmp; rmdir $(LINUX_SRCDIR).tmp; \
-               $(GIT) clone $(XEN_LINUX_GIT_URL) $(LINUX_SRCDIR).tmp; \
-               cd $(LINUX_SRCDIR).tmp; \
-               $(GIT) checkout $(XEN_LINUX_GIT_REMOTEBRANCH); \
-               cd ..; mv $(LINUX_SRCDIR).tmp $(LINUX_SRCDIR); \
+               $(GIT) clone -o xen -n $(XEN_LINUX_GIT_URL) $(LINUX_SRCDIR).tmp; \
+               (cd $(LINUX_SRCDIR).tmp; git checkout -b $(XEN_LINUX_GIT_REMOTEBRANCH) xen/$(XEN_LINUX_GIT_REMOTEBRANCH) ); \
+               mv $(LINUX_SRCDIR).tmp $(LINUX_SRCDIR); \
        fi
        touch $@