Commit 94ba8a26 authored by Josip Sokcevic's avatar Josip Sokcevic Committed by LUCI CQ

Update origin HEAD when running git migration

This updates local reference to origin/HEAD, which is necessary for
new-branch to work as expected.

R=ehmaldonado@google.com

Change-Id: Ia620b3b01c0ad23bb4e969f9026fa6bcfdd88b90
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2730051
Commit-Queue: Josip Sokcevic <sokcevic@google.com>
Auto-Submit: Josip Sokcevic <sokcevic@google.com>
Reviewed-by: 's avatarEdward Lesmes <ehmaldonado@chromium.org>
parent 1eaaab5c
......@@ -54,7 +54,10 @@ def main():
if project_head != 'refs/heads/main':
raise RuntimeError("The repository is not migrated yet.")
logging.info("Running fetch...")
git_common.run('fetch', remote)
logging.info("Updating remote HEAD...")
git_common.run('remote', 'set-head', '-a', remote)
branches = git_common.get_branches_info(True)
......
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