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>
This commit is contained in:
Jeff King
2011-05-26 18:27:24 -04:00
committed by Junio C Hamano
parent 5b38456ec7
commit 8b8a53744f
7 changed files with 14 additions and 12 deletions

View File

@ -98,6 +98,8 @@ extern void format_commit_message(const struct commit *commit,
extern void pretty_print_commit(enum cmit_fmt fmt, const struct commit *commit,
struct strbuf *sb,
const struct pretty_print_context *context);
extern void pp_commit_easy(enum cmit_fmt fmt, const struct commit *commit,
struct strbuf *sb);
void pp_user_info(const char *what, enum cmit_fmt fmt, struct strbuf *sb,
const char *line, enum date_mode dmode,
const char *encoding);