From: Catalin Marinas Date: Fri, 31 Jul 2009 12:01:47 +0000 (+0100) Subject: Reverse commit 9876a650 - return the first line from git describe X-Git-Tag: v0.15-rc2~15 X-Git-Url: https://git.distorted.org.uk/~mdw/stgit/commitdiff_plain/9a4a9c2c9c5dad509c68716ac8ec043b5604fa91 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 --- 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: