summaryrefslogtreecommitdiff
path: root/builtin/shortlog.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2011-05-31 19:19:11 (GMT)
committerJunio C Hamano <gitster@pobox.com>2011-05-31 19:19:11 (GMT)
commitf67d2e82d6d2fd385d3d20e8d348eaf69dc95041 (patch)
treee1c16bbf610d405e77443f51f121d857d44eba0b /builtin/shortlog.c
parent1c9d71944a7a35cdfeb09200b20e261737cdc0b9 (diff)
parent9553d2b26395d9a19bf60875784661090f607f4a (diff)
downloadgit-f67d2e82d6d2fd385d3d20e8d348eaf69dc95041.zip
git-f67d2e82d6d2fd385d3d20e8d348eaf69dc95041.tar.gz
git-f67d2e82d6d2fd385d3d20e8d348eaf69dc95041.tar.bz2
Merge branch 'jk/format-patch-am'
* jk/format-patch-am: format-patch: preserve subject newlines with -k clean up calling conventions for pretty.c functions pretty: add pp_commit_easy function for simple callers mailinfo: always clean up rfc822 header folding t: test subject handling in format-patch / am pipeline Conflicts: builtin/branch.c builtin/log.c commit.h
Diffstat (limited to 'builtin/shortlog.c')
-rw-r--r--builtin/shortlog.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/builtin/shortlog.c b/builtin/shortlog.c
index b6f4b0e..37f3193 100644
--- a/builtin/shortlog.c
+++ b/builtin/shortlog.c
@@ -138,9 +138,8 @@ void shortlog_add_commit(struct shortlog *log, struct commit *commit)
const char *author = NULL, *buffer;
struct strbuf buf = STRBUF_INIT;
struct strbuf ufbuf = STRBUF_INIT;
- struct pretty_print_context ctx = {0};
- pretty_print_commit(CMIT_FMT_RAW, commit, &buf, &ctx);
+ pp_commit_easy(CMIT_FMT_RAW, commit, &buf);
buffer = buf.buf;
while (*buffer && *buffer != '\n') {
const char *eol = strchr(buffer, '\n');
@@ -159,11 +158,12 @@ void shortlog_add_commit(struct shortlog *log, struct commit *commit)
sha1_to_hex(commit->object.sha1));
if (log->user_format) {
struct pretty_print_context ctx = {0};
+ ctx.fmt = CMIT_FMT_USERFORMAT;
ctx.abbrev = log->abbrev;
ctx.subject = "";
ctx.after_subject = "";
ctx.date_mode = DATE_NORMAL;
- pretty_print_commit(CMIT_FMT_USERFORMAT, commit, &ufbuf, &ctx);
+ pretty_print_commit(&ctx, commit, &ufbuf);
buffer = ufbuf.buf;
} else if (*buffer) {
buffer++;