pretty: add pp_commit_easy function for simple callers
[git.git] / builtin / log.c
index d8c6c28d2fcc3bd0744f071da536215141dc0d0b..cedfdb6d42b36f352545a5933ef0764ca362b948 100644 (file)
@@ -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);