]> asedeno.scripts.mit.edu Git - git.git/blobdiff - log-tree.c
Merge branch 'js/rebase-detached'
[git.git] / log-tree.c
index 3763ce94fcb5c96f366f84e755c8abd725b00b00..a34beb0b027eaec59fa75d1fa18324a8f24eb13d 100644 (file)
@@ -125,6 +125,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)
 {
        struct strbuf msgbuf;
@@ -273,7 +285,8 @@ void show_log(struct rev_info *opt, const char *sep)
         */
        strbuf_init(&msgbuf, 0);
        pretty_print_commit(opt->commit_format, commit, &msgbuf,
-                                 abbrev, subject, extra_headers, opt->date_mode);
+                           abbrev, subject, extra_headers, opt->date_mode,
+                           has_non_ascii(opt->add_signoff));
 
        if (opt->add_signoff)
                append_signoff(&msgbuf, opt->add_signoff);