Reverse commit 9876a650 - return the first line from git describe
authorCatalin Marinas <catalin.marinas@gmail.com>
Fri, 31 Jul 2009 12:01:47 +0000 (13:01 +0100)
committerCatalin Marinas <catalin.marinas@arm.com>
Thu, 13 Aug 2009 22:10:56 +0000 (23:10 +0100)
Also modify the "publish" to strip the output of git describe.

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
stgit/commands/publish.py
stgit/lib/git.py

index 56dfd3f..9af89e1 100644 (file)
@@ -110,7 +110,7 @@ def func(parser, options, args):
     # base by setting two parents.
     merge_bases = repository.get_merge_bases(public_head, stack.base)
     if not stack.base in merge_bases:
-        message = 'Merge %s into %s' % (repository.describe(stack.base),
+        message = 'Merge %s into %s' % (repository.describe(stack.base).strip(),
                                         utils.strip_prefix('refs/heads/',
                                                            public_ref))
         public_head = __create_commit(repository, stack.head.data.tree,
index bf8be91..6e3bb4f 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().output_one_line()
+                       ).discard_stderr().discard_exitcode().raw_output()
     def simple_merge(self, base, ours, theirs):
         index = self.temp_index()
         try: