X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=builtin%2Fshortlog.c;h=37f3193a3366725a6b11bdb55db7b6ffc6e9b3ce;hb=f026358ef20e0c252388a41fcc8eff125b00927c;hp=b6f4b0eb03b66dda2f691ff5c80b78321c1b701d;hpb=79531569397d88336c147e620fddb1cbf9612d49;p=git.git diff --git a/builtin/shortlog.c b/builtin/shortlog.c index b6f4b0eb0..37f3193a3 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++;