From cfa2ea4423e9f41f5e41f753df42503faefa7c09 Mon Sep 17 00:00:00 2001 From: Alexander Koskovich Date: Mon, 16 Jun 2025 23:19:38 -0400 Subject: [PATCH] info: Fix seperator when superproject revision is "None" Not seen when using sp.commit_id since it has a trailing newline, so modify def commit_id to strip the stdout and append a newline for both using the helper. Manifest groups: default,platform-linux Superproject revision: None---------------------------- -> Manifest groups: default,platform-linux Superproject revision: None ---------------------------- Test: repo info -o with and without superproject Change-Id: I06ad4dd1f7b64b5374c343e583c8a2690dc9c6e7 --- git_superproject.py | 2 +- subcmds/info.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/git_superproject.py b/git_superproject.py index 2ef6df16c..8c2d20795 100644 --- a/git_superproject.py +++ b/git_superproject.py @@ -151,7 +151,7 @@ class Superproject: p.stderr, ) return None - return p.stdout + return p.stdout.strip() @property def project_commit_ids(self): diff --git a/subcmds/info.py b/subcmds/info.py index 2fbdae057..4381588db 100644 --- a/subcmds/info.py +++ b/subcmds/info.py @@ -106,6 +106,7 @@ class Info(PagedCommand): srev = sp.commit_id if sp and sp.commit_id else "None" self.heading("Superproject revision: ") self.headtext(srev) + self.out.nl() self.printSeparator()