pretty: move trailer formatting to trailer.c
[gitweb.git] / trailer.h
index 194f85a102383d2d7a90ed1228034b8d99cf513f..a172811022f1498bb155246ff8608176275fe889 100644 (file)
--- a/trailer.h
+++ b/trailer.h
@@ -40,4 +40,18 @@ void trailer_info_get(struct trailer_info *info, const char *str);
 
 void trailer_info_release(struct trailer_info *info);
 
+/*
+ * Format the trailers from the commit msg "msg" into the strbuf "out".
+ * Note two caveats about "opts":
+ *
+ *   - this is primarily a helper for pretty.c, and not
+ *     all of the flags are supported.
+ *
+ *   - this differs from process_trailers slightly in that we always format
+ *     only the trailer block itself, even if the "only_trailers" option is not
+ *     set.
+ */
+void format_trailers_from_commit(struct strbuf *out, const char *msg,
+                                const struct process_trailer_options *opts);
+
 #endif /* TRAILER_H */