From f54fbf5eefb9740a318344fe400f54f047cc4bf1 Mon Sep 17 00:00:00 2001 From: Stefan Beller Date: Tue, 13 Nov 2018 16:13:00 -0800 Subject: pretty: prepare format_commit_message to handle arbitrary repositories Signed-off-by: Stefan Beller Signed-off-by: Junio C Hamano --- pretty.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'pretty.h') diff --git a/pretty.h b/pretty.h index 7359d318a9..e6625269cf 100644 --- a/pretty.h +++ b/pretty.h @@ -103,9 +103,14 @@ void pp_remainder(struct pretty_print_context *pp, const char **msg_p, * Put the result to "sb". * Please use this function for custom formats. */ -void format_commit_message(const struct commit *commit, +void repo_format_commit_message(struct repository *r, + const struct commit *commit, const char *format, struct strbuf *sb, const struct pretty_print_context *context); +#ifndef NO_THE_REPOSITORY_COMPATIBILITY_MACROS +#define format_commit_message(c, f, s, con) \ + repo_format_commit_message(the_repository, c, f, s, con) +#endif /* * Parse given arguments from "arg", check it for correctness and -- cgit v1.2.3