X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=builtin-shortlog.c;h=b3b055f68ce59b6b91ef6949bd8c4bd0bed68b55;hb=8fb5d44a47dd3657c8be0de5dcf220935b04e98e;hp=b98edc3ba6c155b632d5e140d0b5a3e8a2d4eb9b;hpb=5c30b8f7dd2640a1b75fcbcdd3e175329c5b7bbe;p=git.git diff --git a/builtin-shortlog.c b/builtin-shortlog.c index b98edc3ba..b3b055f68 100644 --- a/builtin-shortlog.c +++ b/builtin-shortlog.c @@ -141,9 +141,9 @@ 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, - 0, NULL, NULL, DATE_NORMAL, 0); + pretty_print_commit(CMIT_FMT_RAW, commit, &buf, &ctx); buffer = buf.buf; while (*buffer && *buffer != '\n') { const char *eol = strchr(buffer, '\n'); @@ -161,8 +161,12 @@ void shortlog_add_commit(struct shortlog *log, struct commit *commit) die("Missing author: %s", sha1_to_hex(commit->object.sha1)); if (log->user_format) { - pretty_print_commit(CMIT_FMT_USERFORMAT, commit, &ufbuf, - DEFAULT_ABBREV, "", "", DATE_NORMAL, 0); + struct pretty_print_context ctx = {0}; + ctx.abbrev = DEFAULT_ABBREV; + ctx.subject = ""; + ctx.after_subject = ""; + ctx.date_mode = DATE_NORMAL; + pretty_print_commit(CMIT_FMT_USERFORMAT, commit, &ufbuf, &ctx); buffer = ufbuf.buf; } else if (*buffer) { buffer++;