path: root/commit.h
diff options
authorJeff King <>2011-05-26 22:27:24 (GMT)
committerJunio C Hamano <>2011-05-26 22:47:20 (GMT)
commit8b8a53744f60274ef07e3a2a51995129c8d42f38 (patch)
tree003d6020e014d51269a9b299f5a829b70194227e /commit.h
parent5b38456ec7bd0229bb35146ab8a905c4b63daeec (diff)
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 <>
Diffstat (limited to 'commit.h')
1 files changed, 2 insertions, 0 deletions
diff --git a/commit.h b/commit.h
index eb6c5af..3e733be 100644
--- a/commit.h
+++ b/commit.h
@@ -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);