]> git.ipfire.org Git - thirdparty/git.git/blobdiff - pretty.h
pretty: prepare format_commit_message to handle arbitrary repositories
[thirdparty/git.git] / pretty.h
index 7359d318a92c167e0f36eabf73fdd1142f0e9031..e6625269cffed0b5aa178696c71c0ceb3acc6a18 100644 (file)
--- 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