Avoid switching branches later and checkout the proper branch right away.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
targets = [ ]
if not os.path.isdir(home_dir+'/source.git'):
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'])
- 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'],
subprocess.call(["git", "pull"], cwd = home_dir+'/source.git')
findtargets = subprocess.Popen([home_dir+'/dumpinfo.pl', 'targets'],