Don't attempt to create "fully qualified names" for SHA1s

Doing so breaks "repo init -b <SHA1>".

Change-Id: Ic071a1b099a9125db22ea446d7e92e7854d69b37
This commit is contained in:
Alexandre Boeglin 2015-04-30 14:50:33 +02:00
parent 4ccad7554b
commit 382582728e

View File

@ -1396,7 +1396,7 @@ class Project(object):
branch = self.GetBranch(name) branch = self.GetBranch(name)
branch.remote = self.GetRemote(self.remote.name) branch.remote = self.GetRemote(self.remote.name)
branch.merge = self.revisionExpr branch.merge = self.revisionExpr
if not branch.merge.startswith('refs/'): if not branch.merge.startswith('refs/') and not ID_RE.match(self.revisionExpr):
branch.merge = R_HEADS + self.revisionExpr branch.merge = R_HEADS + self.revisionExpr
revid = self.GetRevisionId(all_refs) revid = self.GetRevisionId(all_refs)