diff --git a/eobuilder-ctl b/eobuilder-ctl index e6cb665..9cfced8 100755 --- a/eobuilder-ctl +++ b/eobuilder-ctl @@ -441,7 +441,7 @@ def setup_git_tree(project_reference, options): shutil.rmtree(git_project_path) if os.path.exists(git_project_path): existing_tree = True - branch_name = get_git_branch_name(project_reference) + branch_name = options.branch or get_git_branch_name(project_reference) try: subprocess.check_call(['git', 'checkout', '--quiet', branch_name], cwd=git_project_path) @@ -463,6 +463,9 @@ def setup_git_tree(project_reference, options): else: project_url = project_reference call("git clone %s" % project_url) + if options.branch: + subprocess.check_call(['git', 'checkout', '--quiet', branch_name], + cwd=git_project_path) branch_name = get_git_branch_name(project_reference) if not options.branch: