diff options
author | Jeff King <peff@peff.net> | 2011-05-26 18:27:24 -0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2011-05-26 15:47:20 -0700 |
commit | 8b8a53744f60274ef07e3a2a51995129c8d42f38 (patch) | |
tree | 003d6020e014d51269a9b299f5a829b70194227e /builtin/shortlog.c | |
parent | 5b38456ec7bd0229bb35146ab8a905c4b63daeec (diff) | |
download | git-8b8a53744f60274ef07e3a2a51995129c8d42f38.tar.gz |
pretty: add pp_commit_easy function for simple callers
Many callers don't actually care about the pretty print
context at all; let's just give them a simple way of
pretty-printing a commit without having to create a context
struct.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/shortlog.c')
-rw-r--r-- | builtin/shortlog.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/builtin/shortlog.c b/builtin/shortlog.c index 1a21e4b053..90877b5fe2 100644 --- a/builtin/shortlog.c +++ b/builtin/shortlog.c @@ -141,9 +141,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'); |