gclient: Map origin/foo to refs/remotes/origin/foo

Bug: 1200657
Change-Id: Ib719b984a71cd944bbccf3ec7065aaa17f60e638
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2838026
Reviewed-by: Gavin Mak <gavinmak@google.com>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
changes/26/2838026/2
Edward Lesmes 4 years ago committed by LUCI CQ
parent 93d80d8686
commit 4ea67bbd15

@ -488,6 +488,8 @@ class GitWrapper(SCMWrapper):
# If a dependency is not pinned, track the default remote branch.
revision = scm.GIT.GetRemoteHeadRef(self.checkout_path, self.url,
self.remote)
if revision.startswith('origin/'):
revision = 'refs/remotes/' + revision
if managed:
self._DisableHooks()

Loading…
Cancel
Save