From 6704539ab5d786b4484fd2fd75274ca8356c357b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20P=C3=A9ters?= Date: Fri, 26 Jun 2020 12:30:22 +0200 Subject: [PATCH] respect branch if specified on command line (#44491) --- eobuilder-ctl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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: