From: Jo-Philipp Wich Date: Mon, 28 Nov 2016 18:28:07 +0000 (+0100) Subject: phase1: improve Git cloning on the master X-Git-Tag: v1~217 X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=a24d662ed51d52d13005fc390932d50942aa0655;p=buildbot.git phase1: improve Git cloning on the master Avoid switching branches later and checkout the proper branch right away. Signed-off-by: Jo-Philipp Wich --- diff --git a/phase1/master.cfg b/phase1/master.cfg index 2e7c195..2ae92f1 100644 --- a/phase1/master.cfg +++ b/phase1/master.cfg @@ -96,10 +96,8 @@ if ini.has_option("gpg", "passfile"): targets = [ ] if not os.path.isdir(home_dir+'/source.git'): - subprocess.call(["git", "clone", "--depth=1", repo_url, home_dir+'/source.git']) - subprocess.call(["git", "checkout", repo_branch], cwd = home_dir+'/source.git') + subprocess.call(["git", "clone", "--depth=1", "--branch="+repo_branch, repo_url, home_dir+'/source.git']) else: - subprocess.call(["git", "checkout", repo_branch], cwd = home_dir+'/source.git') subprocess.call(["git", "pull"], cwd = home_dir+'/source.git') findtargets = subprocess.Popen([home_dir+'/dumpinfo.pl', 'targets'],