Index: gclient_scm.py |
diff --git a/gclient_scm.py b/gclient_scm.py |
index c0b4a325e9262c49df14e7d4c5356a7de430f2c6..54e550e25522fd82494661b921b1b435ab17d913 100644 |
--- a/gclient_scm.py |
+++ b/gclient_scm.py |
@@ -341,8 +341,8 @@ class GitWrapper(SCMWrapper): |
if revision.startswith('refs/'): |
rev_type = "branch" |
elif revision.startswith(self.remote + '/'): |
- # For compatibility with old naming, translate 'origin' to 'refs/heads' |
- revision = revision.replace(self.remote + '/', 'refs/heads/') |
+ # Rewrite remote refs to their local equivalents. |
+ revision = 'refs/remotes/' + revision |
rev_type = "branch" |
else: |
# hash is also a tag, only make a distinction at checkout |