From 9a4a9c2c9c5dad509c68716ac8ec043b5604fa91 Mon Sep 17 00:00:00 2001 From: Catalin Marinas Date: Fri, 31 Jul 2009 13:01:47 +0100 Subject: [PATCH] Reverse commit 9876a650 - return the first line from git describe Also modify the "publish" to strip the output of git describe. Signed-off-by: Catalin Marinas --- stgit/commands/publish.py | 2 +- stgit/lib/git.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/stgit/commands/publish.py b/stgit/commands/publish.py index 56dfd3f..9af89e1 100644 --- a/stgit/commands/publish.py +++ b/stgit/commands/publish.py @@ -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, diff --git a/stgit/lib/git.py b/stgit/lib/git.py index bf8be91..6e3bb4f 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().output_one_line() + ).discard_stderr().discard_exitcode().raw_output() def simple_merge(self, base, ours, theirs): index = self.temp_index() try: -- 2.11.0