Commit 4fb2477d authored by Edward Lemur's avatar Edward Lemur Committed by Commit Bot

bot_update: Fix syncing to branches.

When syncing remote branches, checkout origin/<branch> instead of
<branch>, since there might be a local branch with that name.

Bug: 859703
Change-Id: I9a49b940f53f75a97e5458fdcf578c3b52b26de2
Reviewed-on: https://chromium-review.googlesource.com/1128271Reviewed-by: 's avatarAndrii Shyshkalov <tandrii@chromium.org>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
parent 3c023259
......@@ -553,7 +553,9 @@ def _get_target_branch_and_revision(solution_name, git_url, revisions):
if len(parts) == 2:
# Support for "branch:revision" syntax.
return parts
return 'master', configured
if COMMIT_HASH_RE.match(configured):
return 'master', configured
return configured, 'HEAD'
def get_target_pin(solution_name, git_url, revisions):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment