diff options
Diffstat (limited to 'log-tree.c')
-rw-r--r-- | log-tree.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/log-tree.c b/log-tree.c index b509c0c7ec..9ebc24b687 100644 --- a/log-tree.c +++ b/log-tree.c @@ -140,6 +140,18 @@ static unsigned int digits_in_number(unsigned int number) return result; } +static int has_non_ascii(const char *s) +{ + int ch; + if (!s) + return 0; + while ((ch = *s++) != '\0') { + if (non_ascii(ch)) + return 1; + } + return 0; +} + void show_log(struct rev_info *opt, const char *sep) { char *msgbuf = NULL; @@ -290,7 +302,8 @@ void show_log(struct rev_info *opt, const char *sep) */ len = pretty_print_commit(opt->commit_format, commit, ~0u, &msgbuf, &msgbuf_len, abbrev, subject, - extra_headers, opt->date_mode); + extra_headers, opt->date_mode, + has_non_ascii(opt->add_signoff)); if (opt->add_signoff) len = append_signoff(&msgbuf, &msgbuf_len, len, |