diff --git a/gclient_scm.py b/gclient_scm.py index 6fb5eb9cd8..70b4f39202 100644 --- a/gclient_scm.py +++ b/gclient_scm.py @@ -547,6 +547,11 @@ class GitWrapper(SCMWrapper): if scm.GIT.IsValidRevision(self.checkout_path, remote_ref): # refs/remotes may need to be updated to cleanly cherry-pick # changes. See https://crbug.com/1255178. + url, _ = gclient_utils.SplitUrlRevision(self.url) + mirror = self._GetMirror(url, options, target_rev, remote_ref) + if mirror: + self._UpdateMirrorIfNotContains(mirror, options, 'branch', + target_rev) self._Capture(['fetch', '--no-tags', self.remote, target_rev]) target_rev = remote_ref elif not scm.GIT.IsValidRevision(self.checkout_path, target_rev):