Only get the first line from 'git describe --all'
authorCatalin Marinas <catalin.marinas@gmail.com>
Fri, 31 Jul 2009 12:01:47 +0000 (13:01 +0100)
committerCatalin Marinas <catalin.marinas@gmail.com>
Fri, 31 Jul 2009 12:01:47 +0000 (13:01 +0100)
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 <catalin.marinas@gmail.com>
stgit/lib/git.py

index 6e3bb4f..bf8be91 100644 (file)
@@ -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: