From 8b8a53744f60274ef07e3a2a51995129c8d42f38 Mon Sep 17 00:00:00 2001 From: Jeff King Date: Thu, 26 May 2011 18:27:24 -0400 Subject: 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 Signed-off-by: Junio C Hamano --- builtin/log.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'builtin/log.c') diff --git a/builtin/log.c b/builtin/log.c index d8c6c28d2f..cedfdb6d42 100644 --- a/builtin/log.c +++ b/builtin/log.c @@ -1439,9 +1439,7 @@ int cmd_cherry(int argc, const char **argv, const char *prefix) if (verbose) { struct strbuf buf = STRBUF_INIT; - struct pretty_print_context ctx = {0}; - pretty_print_commit(CMIT_FMT_ONELINE, commit, - &buf, &ctx); + pp_commit_easy(CMIT_FMT_ONELINE, commit, &buf); printf("%c %s %s\n", sign, find_unique_abbrev(commit->object.sha1, abbrev), buf.buf); -- cgit v1.2.1