mirror of
https://gerrit.googlesource.com/git-repo
synced 2024-12-21 07:16:21 +00:00
info: Handle undefined mergeBranch
When a repo client is initialized with --standalone-manifest, it doesn't have merge branch defined. This results in mergeBranch being None. Bug: b/308025460 Change-Id: Iebceac0976e5d3adab5300bd8dfc76744a791234 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/393716 Tested-by: Josip Sokcevic <sokcevic@google.com> Reviewed-by: Mike Frysinger <vapier@google.com> Commit-Queue: Josip Sokcevic <sokcevic@google.com>
This commit is contained in:
parent
c984e8d4f6
commit
c287428b37
@ -97,7 +97,9 @@ class Info(PagedCommand):
|
|||||||
self.headtext(self.manifest.default.revisionExpr)
|
self.headtext(self.manifest.default.revisionExpr)
|
||||||
self.out.nl()
|
self.out.nl()
|
||||||
self.heading("Manifest merge branch: ")
|
self.heading("Manifest merge branch: ")
|
||||||
self.headtext(mergeBranch)
|
# The manifest might not have a merge branch if it isn't in a git repo,
|
||||||
|
# e.g. if `repo init --standalone-manifest` is used.
|
||||||
|
self.headtext(mergeBranch or "")
|
||||||
self.out.nl()
|
self.out.nl()
|
||||||
self.heading("Manifest groups: ")
|
self.heading("Manifest groups: ")
|
||||||
self.headtext(manifestGroups)
|
self.headtext(manifestGroups)
|
||||||
|
Loading…
Reference in New Issue
Block a user