From a24d662ed51d52d13005fc390932d50942aa0655 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Mon, 28 Nov 2016 19:28:07 +0100 Subject: [PATCH] phase1: improve Git cloning on the master Avoid switching branches later and checkout the proper branch right away. Signed-off-by: Jo-Philipp Wich --- phase1/master.cfg | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) 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'], -- 2.30.2