path: root/commit.h
diff options
authorPat Notz <>2010-11-02 19:59:08 (GMT)
committerJunio C Hamano <>2010-11-04 20:53:34 (GMT)
commit177b29dcab4c6a1b291b718c1fb192d151356f3f (patch)
tree07605c8b609f51cf9ad21ba1bd4f78893f8bcbe9 /commit.h
parenta6fa59924d154f2dcfc331357bf553e043aa0242 (diff)
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 <>
Diffstat (limited to 'commit.h')
1 files changed, 3 insertions, 0 deletions
diff --git a/commit.h b/commit.h
index a0b710f..3bfb31b 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 *);