From: Catalin Marinas Date: Fri, 31 Jul 2009 12:01:47 +0000 (+0100) Subject: Only get the first line from 'git describe --all' X-Git-Tag: v0.15-rc2~16 X-Git-Url: https://git.distorted.org.uk/~mdw/stgit/commitdiff_plain/9876a650b27c7e3d4c4d14f48b8bb9112ac4c88c?ds=sidebyside Only get the first line from 'git describe --all' 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 --- 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: