On 2014-06-30 17:49, Paul Eggert wrote:
Ian Abbott wrote:
I think the lack of MIME headers in Paul's email is the reason why.
Yes, for some reason it's not working for me. I had already noticed the problem, and filed a bug report here:
http://article.gmane.org/gmane.comp.version-control.git/252660
a few hours ago, but no response yet. git format-patch never prompts me, and sometimes it labels the patch as UTF-8, sometimes it doesn't. For example:
$ git format-patch 5be5ee3dd453c5b575f6336eada9390fb205717a^! 0001-Mention-more-JavaScript-libraries.patch $ git format-patch c25e1180cf3ec34d6c731d5ec16739d6d2ca8fc2^! 0001-More-spelling-and-accent-fixes.patch $ grep UTF-8 0* 0001-Mention-more-JavaScript-libraries.patch: <meta http-equiv="Content-type" content='text/html; charset="UTF-8"'>
The first patch is labeled as UTF-8 even though the patch is entirely ASCII; the second patch is not labeled even though it contains non-ASCII characters!
You're mistaken about the "Mention more JavaScript libraries" patch. Grep caught the wrong line! I get the same result in git 2.0.0. It seems git format-patch only adds the MIME headers to the patch if the commit message contains 8-bit characters, irregardless of the patch data. However, that doesn't stop git send-email detecting the lack of Content-Transfer-Encoding and prompting for one when necessary.
My .gitconfig is simple:
[user] name = Paul Eggert email = eggert@cs.ucla.edu [push] default = simple
It seems crazy to me that I would need to specify an obscure option to have 'git format-patch' do the right thing. I run either git 1.9.3 (Fedora 20) or git 1.9.1 (Ubuntu 14.04) and neither version documents sendmail.assume8bitEncoding or --8bit-encoding in its man pages. Perhaps the git folks have been hacking around in this area, and the natural default doesn't work any more? Could you try the above shell commands and see what they output for you? Also, which git version are you running?
Check the man page for git-send-email - the option is described there, although I got it slightly wrong. It should be sendemail.assume8bitEncoding, not sendmail.assume8bitEncoding. I get the same result as you in git 2.0.0. You can set the option in either your global ~/.gitconfig or your local .git/config using either $ git config --global sendemail.assume8bitEncoding UTF-8 or $ git config --local sendemail.assume8bitEncoding UTF-8 (you can omit the --local as that's the default) In either case, the option looks like this in the global or local git config: [sendemail] assume8bitEncoding = UTF-8 -- -=( Ian Abbott @ MEV Ltd. E-mail: <abbotti@mev.co.uk> )=- -=( Tel: +44 (0)161 477 1898 FAX: +44 (0)161 718 3587 )=-