From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jeremy Fitzhardinge Subject: Make sure git clone gets the right kernel branch Date: Thu, 29 Apr 2010 13:49:21 -0700 Message-ID: <4BD9F0D1.9050809@goop.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Keir Fraser Cc: Xen-devel , Ian Jackson List-Id: xen-devel@lists.xenproject.org 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 diff -r 9a1d7caa2024 buildconfigs/src.git-clone --- a/buildconfigs/src.git-clone Mon Apr 26 12:13:23 2010 +0100 +++ b/buildconfigs/src.git-clone Thu Apr 29 13:37:30 2010 -0700 @@ -23,9 +23,8 @@ 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 $@