mirror of
https://gerrit.googlesource.com/git-repo
synced 2024-12-21 07:16:21 +00:00
Support detached HEAD in manifest repository
If the manifest repository is on a detached HEAD and we are parsing an XML formatted manifest we should simply set the branch property to None, rather than crash with an AttributeError. Signed-off-by: Shawn O. Pearce <sop@google.com>
This commit is contained in:
parent
54fccd71fb
commit
21c5c34ee2
@ -183,7 +183,7 @@ class XmlManifest(object):
|
|||||||
if not self._loaded:
|
if not self._loaded:
|
||||||
m = self.manifestProject
|
m = self.manifestProject
|
||||||
b = m.GetBranch(m.CurrentBranch).merge
|
b = m.GetBranch(m.CurrentBranch).merge
|
||||||
if b.startswith(R_HEADS):
|
if b is not None and b.startswith(R_HEADS):
|
||||||
b = b[len(R_HEADS):]
|
b = b[len(R_HEADS):]
|
||||||
self.branch = b
|
self.branch = b
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user