phase1: improve Git cloning on the master
[buildbot.git] / phase1 / master.cfg
index 2e7c195ff8bf0add79dc3d8d0f67fe9c53364c20..2ae92f1aef76e57cf350663a9a45e55e9bf5b4e3 100644 (file)
@@ -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'],