From 177b29dcab4c6a1b291b718c1fb192d151356f3f Mon Sep 17 00:00:00 2001 From: Pat Notz Date: Tue, 2 Nov 2010 13:59:08 -0600 Subject: pretty.c: teach format_commit_message() to reencode the output format_commit_message() will now reencode the content if the desired output encoding is different from the encoding in the passed in commit. Callers wanting to specify the output encoding do so via the pretty_print_context struct. Signed-off-by: Pat Notz Signed-off-by: Junio C Hamano --- commit.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'commit.h') diff --git a/commit.h b/commit.h index a0b710f84..3bfb31b5e 100644 --- a/commit.h +++ b/commit.h @@ -77,6 +77,7 @@ struct pretty_print_context int need_8bit_cte; int show_notes; struct reflog_walk_info *reflog_info; + const char *output_encoding; }; struct userformat_want { @@ -85,6 +86,8 @@ struct userformat_want { extern int has_non_ascii(const char *text); struct rev_info; /* in revision.h, it circularly uses enum cmit_fmt */ +extern char *logmsg_reencode(const struct commit *commit, + const char *output_encoding); extern char *reencode_commit_message(const struct commit *commit, const char **encoding_p); extern void get_commit_format(const char *arg, struct rev_info *); -- cgit v1.2.1