Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2010-06-22 20:31:47 +0400
committerJunio C Hamano <gitster@pobox.com>2010-06-22 20:31:47 +0400
commitb2a60953085651fe892ee20508fe2f561f0bba8f (patch)
treeec32baa27a6634cfff28056d133cdfd7b4a63d42 /builtin
parenta7e664fc2a43c93da57c827b8ef9b7e15de2f249 (diff)
parenta45e1a87adc7cd7ace911049829308ae97b2e914 (diff)
Merge branch 'tc/commit-abbrev-fix' into maint
* tc/commit-abbrev-fix: commit::print_summary(): don't use format_commit_message() t7502-commit: add summary output tests for empty and merge commits t7502-commit: add tests for summary output
Diffstat (limited to 'builtin')
-rw-r--r--builtin/commit.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/builtin/commit.c b/builtin/commit.c
index 278dcdfa62..b71d8f62d1 100644
--- a/builtin/commit.c
+++ b/builtin/commit.c
@@ -1153,13 +1153,11 @@ static void print_summary(const char *prefix, const unsigned char *sha1)
initial_commit ? " (root-commit)" : "");
if (!log_tree_commit(&rev, commit)) {
- struct pretty_print_context ctx = {0};
- struct strbuf buf = STRBUF_INIT;
- ctx.date_mode = DATE_NORMAL;
- format_commit_message(commit, format.buf + 7, &buf, &ctx);
- printf("%s\n", buf.buf);
- strbuf_release(&buf);
+ rev.always_show_header = 1;
+ rev.use_terminator = 1;
+ log_tree_commit(&rev, commit);
}
+
strbuf_release(&format);
}