Commit db5c5ade authored by Edward Lemur's avatar Edward Lemur Committed by Commit Bot

gclient: Fetch refs/{branch-heads,tags}/* if needed.

If we're asked to sync a repo to branch-heads or tags,
make sure we fetch refs/branch-heads/* and refs/tags/* even if
--with-branch-heads or --with-tags was not passed.

Bug: 938160
Change-Id: I04de8e7762c83322692d9551d057ec803fd2ac9c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1506420Reviewed-by: 's avatarAndrii Shyshkalov <tandrii@chromium.org>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
parent ffb1ffb8
......@@ -507,6 +507,11 @@ class GitWrapper(SCMWrapper):
verbose = ['--verbose']
printed_path = True
if revision.startswith('refs/branch-heads'):
options.with_branch_heads = True
if revision.startswith('refs/tags'):
options.with_tags = True
remote_ref = scm.GIT.RefToRemoteRef(revision, self.remote)
if remote_ref:
# Rewrite remote refs to their local equivalents.
......
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