Always fetch the specific revision given
Don't assume the revision is in refs/heads/. Change-Id: I1f71be222ed3ed940d2265aad43d1f2d601fc03a
This commit is contained in:
parent
909d58b2e2
commit
04e52d6166
1 changed files with 8 additions and 8 deletions
16
project.py
16
project.py
|
@ -1817,14 +1817,14 @@ class Project(object):
|
||||||
elif tag_name is not None:
|
elif tag_name is not None:
|
||||||
spec.append('tag')
|
spec.append('tag')
|
||||||
spec.append(tag_name)
|
spec.append(tag_name)
|
||||||
else:
|
|
||||||
branch = self.revisionExpr
|
branch = self.revisionExpr
|
||||||
if is_sha1:
|
if is_sha1:
|
||||||
branch = self.upstream
|
branch = self.upstream
|
||||||
if branch is not None and branch.strip():
|
if branch is not None and branch.strip():
|
||||||
if not branch.startswith('refs/'):
|
if not branch.startswith('refs/'):
|
||||||
branch = R_HEADS + branch
|
branch = R_HEADS + branch
|
||||||
spec.append(str((u'+%s:' % branch) + remote.ToLocal(branch)))
|
spec.append(str((u'+%s:' % branch) + remote.ToLocal(branch)))
|
||||||
cmd.extend(spec)
|
cmd.extend(spec)
|
||||||
|
|
||||||
shallowfetch = self.config.GetString('repo.shallowfetch')
|
shallowfetch = self.config.GetString('repo.shallowfetch')
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue