diff options
| author | Junio C Hamano <gitster@pobox.com> | 2007-10-31 14:55:17 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2007-11-07 18:37:27 -0800 |
| commit | acef41c9db33f2261e46e17cca098df3403dd745 (patch) | |
| tree | 63177195e70d43e7ed3902d2790061690fc35474 /commit.c | |
| parent | Add Documentation/CodingGuidelines (diff) | |
| download | git-acef41c9db33f2261e46e17cca098df3403dd745.tar.gz git-acef41c9db33f2261e46e17cca098df3403dd745.zip | |
format-patch -s: add MIME encoding header if signer's name requires so
When the body of the commit log message contains a non-ASCII character,
format-patch correctly emitted the encoding header to mark the resulting
message as such. However, if the original message was fully ASCII, the
command line switch "-s" was given to add a new sign-off, and
the signer's name was not ASCII only, the resulting message would have
contained non-ASCII character but was not marked as such.
This was cherry-picked from the fix in 'master'
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'commit.c')
| -rw-r--r-- | commit.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -479,7 +479,7 @@ static int get_one_line(const char *msg, unsigned long len) } /* High bit set, or ISO-2022-INT */ -static int non_ascii(int ch) +int non_ascii(int ch) { ch = (ch & 0xff); return ((ch & 0x80) || (ch == 0x1b)); @@ -1158,13 +1158,13 @@ unsigned long pretty_print_commit(enum cmit_fmt fmt, char **buf_p, unsigned long *space_p, int abbrev, const char *subject, const char *after_subject, - enum date_mode dmode) + enum date_mode dmode, + int plain_non_ascii) { unsigned long offset = 0; unsigned long beginning_of_body; int indent = 4; const char *msg = commit->buffer; - int plain_non_ascii = 0; char *reencoded; const char *encoding; char *buf; |
