{"thread":{"id":"25151","subject":"Re: git am should recognize >From","startedAt":"2010-09-19T14:24:55Z","lastAt":"2010-09-20T15:55:24Z","messageCount":10,"participants":["Jonathan Nieder","Russ Allbery","Štěpán Němec","Erik Faye-Lund","Ævar Arnfjörð Bjarmason","Brandon Casey"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"150993","messageId":"AANLkTin_5qzDkMU_1stYZcJpfW-W7K0kxy=0K2dA7SwO@mail.gmail.com","threadId":"25151","inReplyTo":null,"subject":"Re: git am should recognize >From","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2010-09-19T14:24:55Z","receivedAt":"2010-09-19T14:24:55Z","isPatch":false,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"(+cc: some \"git am\" people. Unfortunately I will probably be hard to\nreach for another week or so.)\n\nRuss Allbery wrote:\n\n> I process a lot of git format-patch patches as attachments, but it's\n> common for mailers to mangle the leading \"From \" line by adding a >.\n> This causes git am to not recognize the patch\n\nIgnoring a leading \">\" sounds sane to me at first glance; thanks. (The\nfile to patch is git-am.sh, hint hint. ;-))\n"},{"id":"150994","messageId":"AANLkTinOa+s-28PYXHhtKr_POu2D33ibfgKDKk4Wqi=9@mail.gmail.com","threadId":"25151","inReplyTo":"AANLkTin_5qzDkMU_1stYZcJpfW-W7K0kxy=0K2dA7SwO@mail.gmail.com","subject":"Re: git am should recognize >From","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2010-09-19T14:32:11Z","receivedAt":"2010-09-19T14:32:11Z","isPatch":false,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"Russ Allbery wrote:\n\n> I process a lot of git format-patch patches as attachments,\n\nAside: it seems that many format-patch users are not using it to\ngenerate an mbox with a template message, as originally intended;\ninstead, they just write a cover letter and attach the generated\npatches to it. Are we not advertising the \"am --scissors\" facility[1]\nwell enough?\n\nMaybe format-patch could provide another mode to produce patches that\ndo not include unnecessary headers (in particular, leaving out the\ndifficult \"From \" line and using UTF-8 instead of quoted-printable for\nthe \"From: \" line).\n\nAll that is irrelevant to the \"git am\" feature suggestion, of course.\n\nThanks for a reminder,\nJonathan\n\n[1]\n > lorem ipsum etc etc\n ... reply as usual ...\n ...\n How about this patch?\n -- 8< --\n From: Patch Author <au.thor@example.com>\n Subject: foo: do \"bar\" better\n\n patch description\n ---\n ... patch ...\n"},{"id":"150998","messageId":"87wrqheho4.fsf@windlord.stanford.edu","threadId":"25151","inReplyTo":"AANLkTinOa+s-28PYXHhtKr_POu2D33ibfgKDKk4Wqi=9@mail.gmail.com","subject":"Re: git am should recognize >From","fromName":"Russ Allbery","fromEmail":"rra@debian.org","sentAt":"2010-09-19T18:01:47Z","receivedAt":"2010-09-19T18:01:47Z","isPatch":false,"sender":{"key":"rra@debian.org","avatar":null},"body":"Jonathan Nieder <jrnieder@gmail.com> writes:\n\n> Aside: it seems that many format-patch users are not using it to\n> generate an mbox with a template message, as originally intended;\n\nMyself included.  I don't like other things sending mail for me outside of\nmy normal mail client, since my normal mail client does lots of other\nthings (like know what From address to use, save copies of outgoing mail,\netc.).\n\n> instead, they just write a cover letter and attach the generated patches\n> to it. Are we not advertising the \"am --scissors\" facility[1] well\n> enough?\n\nThat seems like a bad substitute for real MIME structure.  My experience\nis that patches as actual MIME attachments fare much better and are much\nless likely to be mangled when getting to the committer than patches\ninlined in the body of a message.  (Yes, this is a 180 degree reversal\nfrom the situation about ten years ago.)\n\nSpeaking of git am features, it would also be lovely if git am would\nrecognize and accept the format produced by git show, since a lot of\nbeginning Git users tend towards git show output instead of git\nformat-patch.\n\n-- \nRuss Allbery (rra@debian.org)               <http://www.eyrie.org/~eagle/>\n"},{"id":"151002","messageId":"87y6axshmt.fsf_-_@gmail.com","threadId":"25151","inReplyTo":"AANLkTinOa+s-28PYXHhtKr_POu2D33ibfgKDKk4Wqi=9@mail.gmail.com","subject":"Make format-patch produce UTF-8 `From:' header (was Re: git am should recognize >From)","fromName":"Štěpán Němec","fromEmail":"stepnem@gmail.com","sentAt":"2010-09-19T18:38:50Z","receivedAt":"2010-09-19T18:38:50Z","isPatch":false,"sender":{"key":"stepnem@gmail.com","avatar":"https://avatars.githubusercontent.com/u/106838?v=4"},"body":"Jonathan Nieder <jrnieder@gmail.com> writes:\n\n> Maybe format-patch could provide another mode to produce patches that\n> do not include unnecessary headers (in particular, leaving out the\n> difficult \"From \" line and using UTF-8 instead of quoted-printable for\n> the \"From: \" line).\n\nFWIW, the quoted-printable `From:' encoding has always annoyed me -- I\nreplace it manually with my name & address in UTF-8 every time I send\nout a patch. What is the reason format-patch does that (and if there is\na reason not to change the default, could an option to disable it be\nprovided)?\n\nŠtěpán\n"},{"id":"151005","messageId":"87mxrda6e3.fsf@windlord.stanford.edu","threadId":"25151","inReplyTo":"87y6axshmt.fsf_-_@gmail.com","subject":"Re: Make format-patch produce UTF-8 `From:' header","fromName":"Russ Allbery","fromEmail":"rra@debian.org","sentAt":"2010-09-19T19:19:00Z","receivedAt":"2010-09-19T19:19:00Z","isPatch":false,"sender":{"key":"rra@debian.org","avatar":null},"body":"Štěpán Němec <stepnem@gmail.com> writes:\n> Jonathan Nieder <jrnieder@gmail.com> writes:\n\n>> Maybe format-patch could provide another mode to produce patches that\n>> do not include unnecessary headers (in particular, leaving out the\n>> difficult \"From \" line and using UTF-8 instead of quoted-printable for\n>> the \"From: \" line).\n\n> FWIW, the quoted-printable `From:' encoding has always annoyed me -- I\n> replace it manually with my name & address in UTF-8 every time I send\n> out a patch. What is the reason format-patch does that (and if there is\n> a reason not to change the default, could an option to disable it be\n> provided)?\n\nWell, it's required if you're going to actually send the result directly\nas a mail message, since the RFC 5322 format requires headers be encoded\nusing RFC 2047 encoding.  But if you're just attaching the patch to\nanother mail message, it's pointless.\n\n-- \nRuss Allbery (rra@debian.org)               <http://www.eyrie.org/~eagle/>\n"},{"id":"151008","messageId":"AANLkTimivpZPJo-3OoFQ2OVqzO_8_RMEfUwjamScds7_@mail.gmail.com","threadId":"25151","inReplyTo":"87y6axshmt.fsf_-_@gmail.com","subject":"Re: Make format-patch produce UTF-8 `From:' header (was Re: git am should recognize >From)","fromName":"Erik Faye-Lund","fromEmail":"kusmabite@gmail.com","sentAt":"2010-09-19T19:44:15Z","receivedAt":"2010-09-19T19:44:15Z","isPatch":false,"sender":{"key":"kusmabite@gmail.com","avatar":"https://avatars.githubusercontent.com/u/47073?v=4"},"body":"On Sun, Sep 19, 2010 at 8:38 PM, Štěpán Němec <stepnem@gmail.com> wrote:\n> Jonathan Nieder <jrnieder@gmail.com> writes:\n>\n>> Maybe format-patch could provide another mode to produce patches that\n>> do not include unnecessary headers (in particular, leaving out the\n>> difficult \"From \" line and using UTF-8 instead of quoted-printable for\n>> the \"From: \" line).\n>\n> FWIW, the quoted-printable `From:' encoding has always annoyed me -- I\n> replace it manually with my name & address in UTF-8 every time I send\n> out a patch. What is the reason format-patch does that (and if there is\n> a reason not to change the default, could an option to disable it be\n> provided)?\n>\n\nI believe the reason is that RFC 5322 doesn't allow header-fields to\nbe encoded in other ways that by QP, but I could be wrong.\n\nQP being used even when the \"From:\"-line is inlined in the message\nbody seems to be an artefact of the way it's done, and should be\npossible to avoid.\n"},{"id":"151114","messageId":"87k4mgsj1j.fsf_-_@gmail.com","threadId":"25151","inReplyTo":"87mxrda6e3.fsf@windlord.stanford.edu","subject":"use base64 instead of quoted-printable in format-patch headers (was Re: Make format-patch produce UTF-8 `From:' header)","fromName":"Štěpán Němec","fromEmail":"stepnem@gmail.com","sentAt":"2010-09-20T12:20:40Z","receivedAt":"2010-09-20T12:20:40Z","isPatch":false,"sender":{"key":"stepnem@gmail.com","avatar":"https://avatars.githubusercontent.com/u/106838?v=4"},"body":"Russ Allbery <rra@debian.org> writes:\n\n> Štěpán Němec <stepnem@gmail.com> writes:\n>> Jonathan Nieder <jrnieder@gmail.com> writes:\n>\n>>> Maybe format-patch could provide another mode to produce patches that\n>>> do not include unnecessary headers (in particular, leaving out the\n>>> difficult \"From \" line and using UTF-8 instead of quoted-printable for\n>>> the \"From: \" line).\n>\n>> FWIW, the quoted-printable `From:' encoding has always annoyed me -- I\n>> replace it manually with my name & address in UTF-8 every time I send\n>> out a patch. What is the reason format-patch does that (and if there is\n>> a reason not to change the default, could an option to disable it be\n>> provided)?\n>\n> Well, it's required if you're going to actually send the result directly\n> as a mail message, since the RFC 5322 format requires headers be encoded\n> using RFC 2047 encoding.\n\nRight... thanks for pointing that out. So the problem I'm seeing is\nactually different -- some software (including Mutt and the mailing\nlist/archive software used by this list) appears to have problems with\nquoted-printable, but not with base64.\n\nTo take my name as example: when I send mail from Mutt, it is encoded as\n\"=?utf-8?B?xaB0xJtww6FuIE7Em21lYw==?=\", i.e. base64, and both Mutt and\nthe vger archive seem to decode it properly, whereas the\nquoted-printable version produced by fromat-patch, i.e.\n\"=?utf-8?q?=C5=A0t=C4=9Bp=C3=A1n=20N=C4=9Bmec?=\" in this case, is left\nundecoded by Mutt and mis-decoded in the ML archive as far as I have\nseen. I'm not sure about other software (Gnus seems to be able to deal\nwith both correctly), but perhaps it would make sense to switch to\nbase64 in format-patch?\n\nŠtěpán\n"},{"id":"151117","messageId":"AANLkTim-vfrxGbdfXeef81uP29NSSzutHbs-yhhQtiA8@mail.gmail.com","threadId":"25151","inReplyTo":"87k4mgsj1j.fsf_-_@gmail.com","subject":"Re: use base64 instead of quoted-printable in format-patch headers (was Re: Make format-patch produce UTF-8 `From:' header)","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2010-09-20T13:46:40Z","receivedAt":"2010-09-20T13:46:40Z","isPatch":false,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"On Mon, Sep 20, 2010 at 12:20, Štěpán Němec <stepnem@gmail.com> wrote:\n> Russ Allbery <rra@debian.org> writes:\n>\n>> Štěpán Němec <stepnem@gmail.com> writes:\n>>> Jonathan Nieder <jrnieder@gmail.com> writes:\n>>\n>>>> Maybe format-patch could provide another mode to produce patches that\n>>>> do not include unnecessary headers (in particular, leaving out the\n>>>> difficult \"From \" line and using UTF-8 instead of quoted-printable for\n>>>> the \"From: \" line).\n>>\n>>> FWIW, the quoted-printable `From:' encoding has always annoyed me -- I\n>>> replace it manually with my name & address in UTF-8 every time I send\n>>> out a patch. What is the reason format-patch does that (and if there is\n>>> a reason not to change the default, could an option to disable it be\n>>> provided)?\n>>\n>> Well, it's required if you're going to actually send the result directly\n>> as a mail message, since the RFC 5322 format requires headers be encoded\n>> using RFC 2047 encoding.\n>\n> Right... thanks for pointing that out. So the problem I'm seeing is\n> actually different -- some software (including Mutt and the mailing\n> list/archive software used by this list) appears to have problems with\n> quoted-printable, but not with base64.\n>\n> To take my name as example: when I send mail from Mutt, it is encoded as\n> \"=?utf-8?B?xaB0xJtww6FuIE7Em21lYw==?=\", i.e. base64, and both Mutt and\n> the vger archive seem to decode it properly, whereas the\n> quoted-printable version produced by fromat-patch, i.e.\n> \"=?utf-8?q?=C5=A0t=C4=9Bp=C3=A1n=20N=C4=9Bmec?=\" in this case, is left\n> undecoded by Mutt and mis-decoded in the ML archive as far as I have\n> seen. I'm not sure about other software (Gnus seems to be able to deal\n> with both correctly), but perhaps it would make sense to switch to\n> base64 in format-patch?\n\nThe advantage of quoted-printable is the printable part. It's at least\nsomewhat human readable, e.g.:\n\n    =?UTF-8?q?=C3=86var=20Arnfj=C3=B6r=C3=B0=20Bjarmason?=\n\nI have some chance of spotting a typo or something in there if I look\nat the raw E-Mail (which I often do), but not with base64.\n\nAre we sure we're correctly encoding quoted-printable? E.g. maybe\n?UTF-8? instead of ?utf-8? would work? It seems odd that a widely used\nclient like Mutt would screw up such a widely used encoding.\n"},{"id":"151123","messageId":"ml4g8cZKMzCEccW79LHWosmZo3sz8RXCtZnyPWJ59xPTtblrKv8xLQ@cipher.nrlssc.navy.mil","threadId":"25151","inReplyTo":"AANLkTim-vfrxGbdfXeef81uP29NSSzutHbs-yhhQtiA8@mail.gmail.com","subject":"Re: use base64 instead of quoted-printable in format-patch headers (was Re: Make format-patch produce UTF-8 `From:' header)","fromName":"Brandon Casey","fromEmail":"brandon.casey.ctr@nrlssc.navy.mil","sentAt":"2010-09-20T15:29:23Z","receivedAt":"2010-09-20T15:29:23Z","isPatch":false,"sender":{"key":"brandon.casey.ctr@nrlssc.navy.mil","avatar":null},"body":"On 09/20/2010 08:46 AM, Ævar Arnfjörð Bjarmason wrote:\n> On Mon, Sep 20, 2010 at 12:20, Štěpán Němec <stepnem@gmail.com> wrote:\n>> Russ Allbery <rra@debian.org> writes:\n>>\n>>> Štěpán Němec <stepnem@gmail.com> writes:\n>>>> Jonathan Nieder <jrnieder@gmail.com> writes:\n>>>\n>>>>> Maybe format-patch could provide another mode to produce patches that\n>>>>> do not include unnecessary headers (in particular, leaving out the\n>>>>> difficult \"From \" line and using UTF-8 instead of quoted-printable for\n>>>>> the \"From: \" line).\n>>>\n>>>> FWIW, the quoted-printable `From:' encoding has always annoyed me -- I\n>>>> replace it manually with my name & address in UTF-8 every time I send\n>>>> out a patch. What is the reason format-patch does that (and if there is\n>>>> a reason not to change the default, could an option to disable it be\n>>>> provided)?\n>>>\n>>> Well, it's required if you're going to actually send the result directly\n>>> as a mail message, since the RFC 5322 format requires headers be encoded\n>>> using RFC 2047 encoding.\n>>\n>> Right... thanks for pointing that out. So the problem I'm seeing is\n>> actually different -- some software (including Mutt and the mailing\n>> list/archive software used by this list) appears to have problems with\n>> quoted-printable, but not with base64.\n>>\n>> To take my name as example: when I send mail from Mutt, it is encoded as\n>> \"=?utf-8?B?xaB0xJtww6FuIE7Em21lYw==?=\", i.e. base64, and both Mutt and\n>> the vger archive seem to decode it properly, whereas the\n>> quoted-printable version produced by fromat-patch, i.e.\n>> \"=?utf-8?q?=C5=A0t=C4=9Bp=C3=A1n=20N=C4=9Bmec?=\" in this case, is left\n>> undecoded by Mutt and mis-decoded in the ML archive as far as I have\n>> seen. I'm not sure about other software (Gnus seems to be able to deal\n>> with both correctly), but perhaps it would make sense to switch to\n>> base64 in format-patch?\n> \n> The advantage of quoted-printable is the printable part. It's at least\n> somewhat human readable, e.g.:\n> \n>     =?UTF-8?q?=C3=86var=20Arnfj=C3=B6r=C3=B0=20Bjarmason?=\n> \n> I have some chance of spotting a typo or something in there if I look\n> at the raw E-Mail (which I often do), but not with base64.\n> \n> Are we sure we're correctly encoding quoted-printable? E.g. maybe\n> ?UTF-8? instead of ?utf-8? would work? It seems odd that a widely used\n> client like Mutt would screw up such a widely used encoding.\n\nI don't think we should be producing lower-case utf-8 anymore, since\n1.6.4 I think.\n\nI have encountered platforms, like older Solaris or IRIX, that indeed\ndid not understand utf-8, but did understand UTF-8.  So, it is something\nto check out.  Perhaps Mutt or the mailing list archive were running\non such a system?\n\n-Brandon\n"},{"id":"151126","messageId":"87fwx4s93n.fsf@gmail.com","threadId":"25151","inReplyTo":"AANLkTim-vfrxGbdfXeef81uP29NSSzutHbs-yhhQtiA8@mail.gmail.com","subject":"Re: use base64 instead of quoted-printable in format-patch headers","fromName":"Štěpán Němec","fromEmail":"stepnem@gmail.com","sentAt":"2010-09-20T15:55:24Z","receivedAt":"2010-09-20T15:55:24Z","isPatch":false,"sender":{"key":"stepnem@gmail.com","avatar":"https://avatars.githubusercontent.com/u/106838?v=4"},"body":"Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:\n> The advantage of quoted-printable is the printable part. It's at least\n> somewhat human readable, e.g.:\n>\n>     =?UTF-8?q?=C3=86var=20Arnfj=C3=B6r=C3=B0=20Bjarmason?=\n>\n> I have some chance of spotting a typo or something in there if I look\n> at the raw E-Mail (which I often do), but not with base64.\n\n...apart from all the UTF-8 bytes and/or unless the name does not\ncontain any ASCII characters at all; anyway, I don't consider this\nargument very compelling, but see below.\n\n> Are we sure we're correctly encoding quoted-printable? E.g. maybe\n> ?UTF-8? instead of ?utf-8? would work?\n\nAs per RFC 2047, both the charset (`utf-8') and encoding (`q') are\ncase-insensitive, so this shouldn't matter.\n\n> It seems odd that a widely used client like Mutt would screw up such a\n> widely used encoding.\n\nActually, upon some tests and repeated closer examination, I obviously\nmis-diagnosed the problem once again (I really apologize for all the\nnoise). It appears that when I send an e-mail from Mutt using the file\nproduced by `git format-patch' as a template (i.e. `mutt -H some.patch'\n-> edit -> send), Mutt for some reason re-encodes the already encoded\n`From:' header, resulting in\n\nFrom: =?utf-8?B?PT9VVEYtOD9xPz1DNT1BMHQ9QzQ9OUJwPUMzPUExbj0yME49QzQ9OUJt?=\n        =?utf-8?Q?ec=3F=3D?= <stepnem@gmail.com>\n\n...which doesn't make much sense to me (or Mutt or Gnus).\n\nSo this probably really belongs in some Mutt help forum... I'm sorry.\n(If someone knows how to work around the problem, please let me know).\n\nŠtěpán\n"}]}