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: Edward Lesmes <ehmaldonado@chromium.org>
changes/51/2730051/3
Josip Sokcevic 4 years ago committed by LUCI CQ
parent 1eaaab5c1f
commit 94ba8a26d8

@ -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)

Loading…
Cancel
Save