mirror of
https://chromium.googlesource.com/chromium/tools/depot_tools.git
synced 2026-01-11 10:41:31 +00:00
gclient: Call _AutoFetchRef before using a rev in _FetchAndReset
Other places in gclient_scm (GitWrapper._Clone, GitWrapper.update) do the same. Note that we call _AutoFetchRef even after running _Fetch, because _Fetch in not guaranteed to fetch a specific revision. For example, a checkout might be configured without branch heads and without tags, yet a revision might point to a tag. Change-Id: I5cfd8ebafa4b45afd72b0251f04e5d713199f2fd Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4715239 Commit-Queue: Yiwei Zhang <yiwzhang@google.com> Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
This commit is contained in:
@@ -307,6 +307,7 @@ class GitWrapper(SCMWrapper):
|
||||
self._SetFetchConfig(options)
|
||||
|
||||
self._Fetch(options, prune=True, quiet=options.verbose)
|
||||
revision = self._AutoFetchRef(options, revision)
|
||||
self._Scrub(revision, options)
|
||||
if file_list is not None:
|
||||
files = self._Capture(['-c', 'core.quotePath=false',
|
||||
|
||||
Reference in New Issue
Block a user