diff options
author | Nasser Grainawi <nasser@codeaurora.org> | 2014-09-30 13:34:52 -0600 |
---|---|---|
committer | Kevin Degi <kdegi@codeaurora.org> | 2014-10-09 13:41:56 -0600 |
commit | 04e52d616625cc61d897a92d5e9a2c068465f8fc (patch) | |
tree | 352054271b7b44e919d39321e41be982a0d91f26 /project.py | |
parent | 909d58b2e2e3695ecfa80a54b8700fb889a02677 (diff) | |
download | git-repo-04e52d616625cc61d897a92d5e9a2c068465f8fc.tar.gz |
Always fetch the specific revision given
Don't assume the revision is in refs/heads/.
Change-Id: I1f71be222ed3ed940d2265aad43d1f2d601fc03a
Diffstat (limited to 'project.py')
-rw-r--r-- | project.py | 16 |
1 files changed, 8 insertions, 8 deletions
@@ -1817,14 +1817,14 @@ class Project(object): | |||
1817 | elif tag_name is not None: | 1817 | elif tag_name is not None: |
1818 | spec.append('tag') | 1818 | spec.append('tag') |
1819 | spec.append(tag_name) | 1819 | spec.append(tag_name) |
1820 | else: | 1820 | |
1821 | branch = self.revisionExpr | 1821 | branch = self.revisionExpr |
1822 | if is_sha1: | 1822 | if is_sha1: |
1823 | branch = self.upstream | 1823 | branch = self.upstream |
1824 | if branch is not None and branch.strip(): | 1824 | if branch is not None and branch.strip(): |
1825 | if not branch.startswith('refs/'): | 1825 | if not branch.startswith('refs/'): |
1826 | branch = R_HEADS + branch | 1826 | branch = R_HEADS + branch |
1827 | spec.append(str((u'+%s:' % branch) + remote.ToLocal(branch))) | 1827 | spec.append(str((u'+%s:' % branch) + remote.ToLocal(branch))) |
1828 | cmd.extend(spec) | 1828 | cmd.extend(spec) |
1829 | 1829 | ||
1830 | shallowfetch = self.config.GetString('repo.shallowfetch') | 1830 | shallowfetch = self.config.GetString('repo.shallowfetch') |