From 9876a650b27c7e3d4c4d14f48b8bb9112ac4c88c Mon Sep 17 00:00:00 2001 Message-Id: <9876a650b27c7e3d4c4d14f48b8bb9112ac4c88c.1718694533.git.mdw@distorted.org.uk> From: Mark Wooding Date: Fri, 31 Jul 2009 13:01:47 +0100 Subject: [PATCH] Only get the first line from 'git describe --all' Organization: Straylight/Edgeware From: Catalin Marinas The Repository.describe() function is used by the 'publish' command. We only need the first line of the description for the commit message rather than the raw output (which contains a new line). Signed-off-by: Catalin Marinas --- stgit/lib/git.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stgit/lib/git.py b/stgit/lib/git.py index 6e3bb4f..bf8be91 100644 --- a/stgit/lib/git.py +++ b/stgit/lib/git.py @@ -617,7 +617,7 @@ class Repository(RunWithEnv): def describe(self, commit): """Use git describe --all on the given commit.""" return self.run(['git', 'describe', '--all', commit.sha1] - ).discard_stderr().discard_exitcode().raw_output() + ).discard_stderr().discard_exitcode().output_one_line() def simple_merge(self, base, ours, theirs): index = self.temp_index() try: -- [mdw]