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:

committed by
Junio C Hamano

parent
5b38456ec7
commit
8b8a53744f
@ -436,9 +436,7 @@ static void print_ref_item(struct ref_item *item, int maxwidth, int verbose,
|
||||
|
||||
commit = item->commit;
|
||||
if (commit && !parse_commit(commit)) {
|
||||
struct pretty_print_context ctx = {0};
|
||||
pretty_print_commit(CMIT_FMT_ONELINE, commit,
|
||||
&subject, &ctx);
|
||||
pp_commit_easy(CMIT_FMT_ONELINE, commit, &subject);
|
||||
sub = subject.buf;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user