summaryrefslogtreecommitdiff
path: root/builtin/commit.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2010-06-21 06:02:46 -0700
committerJunio C Hamano <gitster@pobox.com>2010-06-21 06:02:46 -0700
commit1a5296cb92691c5656bbc6aacaf49ca31b1ee8c0 (patch)
tree4dc18b247c7d38af4537de97f5711e83657914a1 /builtin/commit.c
parentcecff3a45b4660f47a58746eae42b6ddb58e1919 (diff)
parenta45e1a87adc7cd7ace911049829308ae97b2e914 (diff)
downloadgit-1a5296cb92691c5656bbc6aacaf49ca31b1ee8c0.tar.gz
Merge branch 'tc/commit-abbrev-fix'
* 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/commit.c')
-rw-r--r--builtin/commit.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/builtin/commit.c b/builtin/commit.c
index 0e3ae3c11d..511d4901d5 100644
--- a/builtin/commit.c
+++ b/builtin/commit.c
@@ -1168,13 +1168,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);
}