format_trailers(): use strbuf instead of FILE

This is another preparatory refactor to unify the trailer formatters.

Make format_trailers() also write to a strbuf, to align with
format_trailers_from_commit() which also does the same. Doing this makes
format_trailers() behave similar to format_trailer_info() (which will
soon help us replace one with the other).

Signed-off-by: Linus Arver <linusa@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Linus Arver
2024-03-01 00:14:44 +00:00
committed by Junio C Hamano
parent 9aa1b2bc89
commit bf35e0a018
3 changed files with 14 additions and 8 deletions

View File

@@ -102,7 +102,8 @@ void trailer_info_release(struct trailer_info *info);
void trailer_config_init(void);
void format_trailers(const struct process_trailer_options *,
struct list_head *trailers, FILE *outfile);
struct list_head *trailers,
struct strbuf *out);
void free_trailers(struct list_head *);
/*