{"thread":{"id":"14786","subject":"email address handling","startedAt":"2008-08-01T02:40:42Z","lastAt":"2008-08-04T20:14:50Z","messageCount":41,"participants":["Andrew Morton","Linus Torvalds","Junio C Hamano","Johannes Schindelin","Theodore Tso","Karl Hasselström"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"85853","messageId":"20080731194042.a1534b4d.akpm@linux-foundation.org","threadId":"14786","inReplyTo":null,"subject":"email address handling","fromName":"Andrew Morton","fromEmail":"akpm@linux-foundation.org","sentAt":"2008-08-01T02:40:42Z","receivedAt":"2008-08-01T02:40:42Z","isPatch":false,"sender":{"key":"akpm@linux-foundation.org","avatar":null},"body":"\nA minor thing.\n\nCommit 76ecb4f2d7ea5c3aac8970b9529775316507c6d2 is displayed thusly:\n\n  commit 76ecb4f2d7ea5c3aac8970b9529775316507c6d2\n  Author: Zhang, Rui <rui.zhang@intel.com>\n  Date:   Thu Apr 10 16:20:23 2008 +0800\n\n      ACPI: update thermal temperature\n\nbut that isn't a valid email address.  Because it contains a comma it\nmust be quoted:  \"Zhang, Rui\".\n\nI assume that something in the git toolchain removed his quotes, and\nthat was arguably incorrect.\n"},{"id":"85911","messageId":"alpine.LFD.1.10.0808011229400.3277@nehalem.linux-foundation.org","threadId":"14786","inReplyTo":"20080731194042.a1534b4d.akpm@linux-foundation.org","subject":"Re: email address handling","fromName":"Linus Torvalds","fromEmail":"torvalds@linux-foundation.org","sentAt":"2008-08-01T19:34:58Z","receivedAt":"2008-08-01T19:34:58Z","isPatch":false,"sender":{"key":"torvalds@linux-foundation.org","avatar":"https://avatars.githubusercontent.com/u/1024025?v=4"},"body":"\n\nOn Thu, 31 Jul 2008, Andrew Morton wrote:\n> \n> A minor thing.\n> \n> Commit 76ecb4f2d7ea5c3aac8970b9529775316507c6d2 is displayed thusly:\n> \n>   commit 76ecb4f2d7ea5c3aac8970b9529775316507c6d2\n>   Author: Zhang, Rui <rui.zhang@intel.com>\n>   Date:   Thu Apr 10 16:20:23 2008 +0800\n> \n>       ACPI: update thermal temperature\n> \n> but that isn't a valid email address.  Because it contains a comma it\n> must be quoted:  \"Zhang, Rui\".\n\nThe email address is rui.zhang@intel.com.\n\nThe name is Zhang, Rui.\n\nGit at no point ever mixes the two up. It's _not_ one field (\"Zhang, Rui \n<rui.zhang@intel.com>\"), it's literally two different parts that you set \nseparately, that just get shown (and encoded in the commit, for that \nmatter) in a way that resembles a single email address.\n\n> I assume that something in the git toolchain removed his quotes, and\n> that was arguably incorrect.\n\nNo, it would be incorrect to keep them, because the name doesn't contain \nthe quotes. The name is just that \n\n\tZhang, Rui\n\npart.\n\nI've considered having the email->name detection change \"A, B\" into \"B A\", \nbut it's not always right, so it doesn't try to munge the names it finds \nin other ways except to remove obvious crud from the ends.\n\nAnd Andrew, this is true of Signed-off-by: lines too, btw. If you actually \nwant to send emails to them, _then_ you need to add quotes to follow the \nemail rules. \n\n\t\tLinus\n"},{"id":"85913","messageId":"20080801124550.26b9efc0.akpm@linux-foundation.org","threadId":"14786","inReplyTo":"alpine.LFD.1.10.0808011229400.3277@nehalem.linux-foundation.org","subject":"Re: email address handling","fromName":"Andrew Morton","fromEmail":"akpm@linux-foundation.org","sentAt":"2008-08-01T19:45:50Z","receivedAt":"2008-08-01T19:45:50Z","isPatch":false,"sender":{"key":"akpm@linux-foundation.org","avatar":null},"body":"On Fri, 1 Aug 2008 12:34:58 -0700 (PDT)\nLinus Torvalds <torvalds@linux-foundation.org> wrote:\n\n> And Andrew, this is true of Signed-off-by: lines too, btw. If you actually \n> want to send emails to them, _then_ you need to add quotes to follow the \n> email rules. \n\nThat's how I noticed it - copied, pasted, MTA barfed.\n\nConverting a usable name+email-address into an unusable one seems ... unuseful.\n"},{"id":"85915","messageId":"alpine.LFD.1.10.0808011253580.3277@nehalem.linux-foundation.org","threadId":"14786","inReplyTo":"20080801124550.26b9efc0.akpm@linux-foundation.org","subject":"Re: email address handling","fromName":"Linus Torvalds","fromEmail":"torvalds@linux-foundation.org","sentAt":"2008-08-01T19:56:44Z","receivedAt":"2008-08-01T19:56:44Z","isPatch":false,"sender":{"key":"torvalds@linux-foundation.org","avatar":"https://avatars.githubusercontent.com/u/1024025?v=4"},"body":"\n\nOn Fri, 1 Aug 2008, Andrew Morton wrote:\n> \n> That's how I noticed it - copied, pasted, MTA barfed.\n> \n> Converting a usable name+email-address into an unusable one seems ... unuseful.\n\nUmm. Those signed-off ones weren't even _converted_ They were written by \npeople.\n\nAlso, you seemed to miss the point that it's not a name+email-address. \n\nIt's a name. Oh, and there's an email address too. But they aren't \nconnected. We often just print out the name *without* the email address. \nWhy should those things have to know about some totally irrelevant email \nquoting rules? They weren't emails, didn't know about it, and didn't care.\n\n\t\t\tLinus\n"},{"id":"85916","messageId":"7viquksdyn.fsf@gitster.siamese.dyndns.org","threadId":"14786","inReplyTo":"20080801124550.26b9efc0.akpm@linux-foundation.org","subject":"Re: email address handling","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2008-08-01T20:00:16Z","receivedAt":"2008-08-01T20:00:16Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Andrew Morton <akpm@linux-foundation.org> writes:\n\n> On Fri, 1 Aug 2008 12:34:58 -0700 (PDT)\n> Linus Torvalds <torvalds@linux-foundation.org> wrote:\n>\n>> And Andrew, this is true of Signed-off-by: lines too, btw. If you actually \n>> want to send emails to them, _then_ you need to add quotes to follow the \n>> email rules. \n>\n> That's how I noticed it - copied, pasted, MTA barfed.\n>\n> Converting a usable name+email-address into an unusable one seems ... unuseful.\n\nName is used not just for pasting into your MUA.  For example, if your\nshortlog output showed this, it would be \"funny looking\":\n\n    \"Zhang, Rui\" (4):\n            ...\n\n    Andrew Morton (20):\n            ...\n            ...\n"},{"id":"85918","messageId":"7vej58sdls.fsf@gitster.siamese.dyndns.org","threadId":"14786","inReplyTo":"alpine.LFD.1.10.0808011253580.3277@nehalem.linux-foundation.org","subject":"Re: email address handling","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2008-08-01T20:07:59Z","receivedAt":"2008-08-01T20:07:59Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Linus Torvalds <torvalds@linux-foundation.org> writes:\n\n> On Fri, 1 Aug 2008, Andrew Morton wrote:\n>> \n>> That's how I noticed it - copied, pasted, MTA barfed.\n>> \n>> Converting a usable name+email-address into an unusable one seems ... unuseful.\n>\n> Umm. Those signed-off ones weren't even _converted_ They were written by \n> people.\n>\n> Also, you seemed to miss the point that it's not a name+email-address. \n>\n> It's a name. Oh, and there's an email address too. But they aren't \n> connected. We often just print out the name *without* the email address. \n> Why should those things have to know about some totally irrelevant email \n> quoting rules? They weren't emails, didn't know about it, and didn't care.\n\nOne place that can matter is git-send-email.perl; IIRC, it reads from the\nS-o-b:, Cc: and From: lines people write, and these follow \"name next to\naddress, that does not care irrelevant email quoting rules\" format.  I do\nnot think send-email currently does much about quoting them, but I think\nit should be the right place to do so.\n"},{"id":"85919","messageId":"20080801131127.20b3acfd.akpm@linux-foundation.org","threadId":"14786","inReplyTo":"alpine.LFD.1.10.0808011253580.3277@nehalem.linux-foundation.org","subject":"Re: email address handling","fromName":"Andrew Morton","fromEmail":"akpm@linux-foundation.org","sentAt":"2008-08-01T20:11:27Z","receivedAt":"2008-08-01T20:11:27Z","isPatch":false,"sender":{"key":"akpm@linux-foundation.org","avatar":null},"body":"On Fri, 1 Aug 2008 12:56:44 -0700 (PDT)\nLinus Torvalds <torvalds@linux-foundation.org> wrote:\n\n> \n> \n> On Fri, 1 Aug 2008, Andrew Morton wrote:\n> > \n> > That's how I noticed it - copied, pasted, MTA barfed.\n> > \n> > Converting a usable name+email-address into an unusable one seems ... unuseful.\n> \n> Umm. Those signed-off ones weren't even _converted_ They were written by \n> people.\n\nThis was the Author: line.\n\nAfaik that person doesn't send patches via git, and that this text by\nsome means was transferred into git from an emailed patch.\n\nSo unless he explicitly typed a \"From:\" line (without quoting his name)\ninto the top of his changelog, some piece of software somewhere has\nstripped the quotes when it was converting his name from the email\nheaders into the git Author: line.\n\n> Also, you seemed to miss the point that it's not a name+email-address. \n\nI know exactly what it is.\n\n> It's a name. Oh, and there's an email address too. But they aren't \n> connected. We often just print out the name *without* the email address. \n> Why should those things have to know about some totally irrelevant email \n> quoting rules? They weren't emails, didn't know about it, and didn't care.\n\nWell, as I said, it's a minor point.  It's just that converting\nsomething which _can_ be copied and pasted into an MUA into something\nwhich cannot seems...  odd.\n\nMost sane MUA's will omit the quotes if the name part does not need\nthem, so simply retaining the quotes if they were originally there\nwould be an OK thing to do.\n\n\nSo how serious is this issue?\n\nWell, if all MUAs either generate synchronous error messages or will\ninsert the quotes for you then not very serious at all.\n\nIf, however, there are MUA+MTA combinations which do _not_ inform about\nor correct the error then this failure to quote the name could cause\npeople's emails to get lost altogether, which is a bit serious.\n\n\nAlso, _most_ git Author: lines _can_ be successfully copied-and-pasted\ninto an MUA.  The fact that a small minority of git Author: lines cannot\nbe used this way is a bit dangerous.\n"},{"id":"85920","messageId":"20080801131433.de5d06cc.akpm@linux-foundation.org","threadId":"14786","inReplyTo":"7viquksdyn.fsf@gitster.siamese.dyndns.org","subject":"Re: email address handling","fromName":"Andrew Morton","fromEmail":"akpm@linux-foundation.org","sentAt":"2008-08-01T20:14:33Z","receivedAt":"2008-08-01T20:14:33Z","isPatch":false,"sender":{"key":"akpm@linux-foundation.org","avatar":null},"body":"On Fri, 01 Aug 2008 13:00:16 -0700\nJunio C Hamano <gitster@pobox.com> wrote:\n\n> Andrew Morton <akpm@linux-foundation.org> writes:\n> \n> > On Fri, 1 Aug 2008 12:34:58 -0700 (PDT)\n> > Linus Torvalds <torvalds@linux-foundation.org> wrote:\n> >\n> >> And Andrew, this is true of Signed-off-by: lines too, btw. If you actually \n> >> want to send emails to them, _then_ you need to add quotes to follow the \n> >> email rules. \n> >\n> > That's how I noticed it - copied, pasted, MTA barfed.\n> >\n> > Converting a usable name+email-address into an unusable one seems ... unuseful.\n> \n> Name is used not just for pasting into your MUA.  For example, if your\n> shortlog output showed this, it would be \"funny looking\":\n> \n>     \"Zhang, Rui\" (4):\n>             ...\n> \n>     Andrew Morton (20):\n>             ...\n>             ...\n\nyep.  That'd be a git-shortlog bug :)\n\nI really don't care about this much!\n"},{"id":"85922","messageId":"alpine.LFD.1.10.0808011316050.3277@nehalem.linux-foundation.org","threadId":"14786","inReplyTo":"20080801131127.20b3acfd.akpm@linux-foundation.org","subject":"Re: email address handling","fromName":"Linus Torvalds","fromEmail":"torvalds@linux-foundation.org","sentAt":"2008-08-01T20:17:11Z","receivedAt":"2008-08-01T20:17:11Z","isPatch":false,"sender":{"key":"torvalds@linux-foundation.org","avatar":"https://avatars.githubusercontent.com/u/1024025?v=4"},"body":"\n\nOn Fri, 1 Aug 2008, Andrew Morton wrote:\n> \n> This was the Author: line.\n\nSo?\n\nI mean, it's not sending email, is it? It says \"Author:\".\n\nYou could have just inserted the actual email address. Or something.\n\n\t\tLinus\n"},{"id":"85924","messageId":"20080801132415.0b0314e4.akpm@linux-foundation.org","threadId":"14786","inReplyTo":"alpine.LFD.1.10.0808011316050.3277@nehalem.linux-foundation.org","subject":"Re: email address handling","fromName":"Andrew Morton","fromEmail":"akpm@linux-foundation.org","sentAt":"2008-08-01T20:24:15Z","receivedAt":"2008-08-01T20:24:15Z","isPatch":false,"sender":{"key":"akpm@linux-foundation.org","avatar":null},"body":"On Fri, 1 Aug 2008 13:17:11 -0700 (PDT)\nLinus Torvalds <torvalds@linux-foundation.org> wrote:\n\n> \n> \n> On Fri, 1 Aug 2008, Andrew Morton wrote:\n> > \n> > This was the Author: line.\n> \n> So?\n\nSo all the other things I said.\n\n> I mean, it's not sending email, is it? It says \"Author:\".\n> \n> You could have just inserted the actual email address. Or something.\n> \n\npls read earlier email.\n"},{"id":"85928","messageId":"alpine.LFD.1.10.0808011335230.3277@nehalem.linux-foundation.org","threadId":"14786","inReplyTo":"20080801132415.0b0314e4.akpm@linux-foundation.org","subject":"Re: email address handling","fromName":"Linus Torvalds","fromEmail":"torvalds@linux-foundation.org","sentAt":"2008-08-01T20:40:00Z","receivedAt":"2008-08-01T20:40:00Z","isPatch":false,"sender":{"key":"torvalds@linux-foundation.org","avatar":"https://avatars.githubusercontent.com/u/1024025?v=4"},"body":"\n\nOn Fri, 1 Aug 2008, Andrew Morton wrote:\n> \n> pls read earlier email.\n\nI did. It seems that your complaint is:\n\n> So unless he explicitly typed a \"From:\" line (without quoting his name)\n> into the top of his changelog, some piece of software somewhere has\n> stripped the quotes when it was converting his name from the email\n> headers into the git Author: line.\n\nAnd yes, git will strip out all the crap and try to make it into a real \nname.\n\nThe part _you_ don't seem to understand is that my point is\n\n - git changed that \"From:\" line to an \"Author:\" line\n\n - \"git log\" isn't an email system. It's a human-readable (and \n   machine-parseable, for that matter) log.\n\nIf you want to turn it into emails, you need to follow the email rules. \nYou're cutting-and-pasting anyway, it's not like this is fundamentally \nhard.\n\n\t\tLinus\n"},{"id":"85930","messageId":"alpine.LFD.1.10.0808011340130.3277@nehalem.linux-foundation.org","threadId":"14786","inReplyTo":"alpine.LFD.1.10.0808011335230.3277@nehalem.linux-foundation.org","subject":"Re: email address handling","fromName":"Linus Torvalds","fromEmail":"torvalds@linux-foundation.org","sentAt":"2008-08-01T20:41:30Z","receivedAt":"2008-08-01T20:41:30Z","isPatch":false,"sender":{"key":"torvalds@linux-foundation.org","avatar":"https://avatars.githubusercontent.com/u/1024025?v=4"},"body":"\n\nOn Fri, 1 Aug 2008, Linus Torvalds wrote:\n> \n> If you want to turn it into emails, you need to follow the email rules. \n> You're cutting-and-pasting anyway, it's not like this is fundamentally \n> hard.\n\nBtw, if sending emails was the _only_ thing that Author line was used for, \nor even the main thing, then it would make sense to keep it in some email \nformat. But it really isn't. Sending emails to people is the _least_ \ncommon thing you do with it. Most of the time you just want to see the \nname in a nice readable format.\n\n\t\tLinus\n"},{"id":"85931","messageId":"20080801135421.5ca0f6af.akpm@linux-foundation.org","threadId":"14786","inReplyTo":"alpine.LFD.1.10.0808011335230.3277@nehalem.linux-foundation.org","subject":"Re: email address handling","fromName":"Andrew Morton","fromEmail":"akpm@linux-foundation.org","sentAt":"2008-08-01T20:54:21Z","receivedAt":"2008-08-01T20:54:21Z","isPatch":false,"sender":{"key":"akpm@linux-foundation.org","avatar":null},"body":"On Fri, 1 Aug 2008 13:40:00 -0700 (PDT)\nLinus Torvalds <torvalds@linux-foundation.org> wrote:\n\n> \n> \n> On Fri, 1 Aug 2008, Andrew Morton wrote:\n> > \n> > pls read earlier email.\n> \n> I did. It seems that your complaint is:\n> \n> > So unless he explicitly typed a \"From:\" line (without quoting his name)\n> > into the top of his changelog, some piece of software somewhere has\n> > stripped the quotes when it was converting his name from the email\n> > headers into the git Author: line.\n> \n> And yes, git will strip out all the crap and try to make it into a real \n> name.\n> \n> The part _you_ don't seem to understand is that my point is\n> \n>  - git changed that \"From:\" line to an \"Author:\" line\n> \n>  - \"git log\" isn't an email system. It's a human-readable (and \n>    machine-parseable, for that matter) log.\n\nWhat you're describing here is some explicit or implicit git design\ndecision and then telling me how it's implemented.\n\nWell, what I'm saying is that it was an incorrect design decision.\n\n> If you want to turn it into emails, you need to follow the email rules. \n> You're cutting-and-pasting anyway, it's not like this is fundamentally \n> hard.\n\nHere is a real story from a real user of your software:\n\nI very very frequently copy and paste name+email address out of git\noutput and into an MUA.  Have done it thousands and thousands of times,\nand it has always worked.  I'm sure that many others do the same thing.\n\nYesterday, I copied and pasted what _looked_ like a usable\nname+email-address from some git output and into an MUA.  Unlike the\nthousands of preceding times, it did not work.\n\nI think it was reasonable of me to assume that it would work.  Blaming\nthe surprised and misled user for not understanding some earlier\ninternal design decision didn't satisfy him!\n\nTrue story!  From a user.\n"},{"id":"85934","messageId":"alpine.LFD.1.10.0808011356560.3277@nehalem.linux-foundation.org","threadId":"14786","inReplyTo":"20080801135421.5ca0f6af.akpm@linux-foundation.org","subject":"Re: email address handling","fromName":"Linus Torvalds","fromEmail":"torvalds@linux-foundation.org","sentAt":"2008-08-01T21:12:04Z","receivedAt":"2008-08-01T21:12:04Z","isPatch":false,"sender":{"key":"torvalds@linux-foundation.org","avatar":"https://avatars.githubusercontent.com/u/1024025?v=4"},"body":"\n\nOn Fri, 1 Aug 2008, Andrew Morton wrote:\n> \n> Well, what I'm saying is that it was an incorrect design decision.\n\nAnd I'm saying that I disagree. \n\n> Yesterday, I copied and pasted what _looked_ like a usable\n> name+email-address from some git output and into an MUA.  Unlike the\n> thousands of preceding times, it did not work.\n> \n> I think it was reasonable of me to assume that it would work.  Blaming\n> the surprised and misled user for not understanding some earlier\n> internal design decision didn't satisfy him!\n> \n> True story!  From a user.\n\nHey, there are tons of surprises in life. Users make mistakes and \nassumptions that turn out to not be true. If you think you can avoid all \nsuch issues, I think you aren't living in the real world.\n\nYou'll be shocked to hear that even the so-called _email_ address isn't \nnecessarily valid at all at times. Look closer, and you'll find email \naddresses that don't work at all. It turns out that if you don't set it \nexplicitly, git will guess, and sometimes the end result won't actually \nwork as an email address.\n\nBeign surprised and then saying \"I was surprised, so the whole design is \nbroken\" - that's a very silly standpoint to make. I suggest you \nreconsider. How many times have you had people \"surprised\" by correct \nkernel behaviour? Happens all the time.\n\nDo you think they are all indicative of bad design, or maybe just \"welcome \nto the real world - your preconceived notions didn't turn out to be \naccurate after all\"?\n\nIt's a design decision to show the name as readably as possible. One that \nI think was correct.\n\n\t\t\tLinus\n"},{"id":"85933","messageId":"alpine.DEB.1.00.0808012314580.9611@pacific.mpi-cbg.de.mpi-cbg.de","threadId":"14786","inReplyTo":"20080801135421.5ca0f6af.akpm@linux-foundation.org","subject":"Re: email address handling","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2008-08-01T21:16:01Z","receivedAt":"2008-08-01T21:16:01Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Fri, 1 Aug 2008, Andrew Morton wrote:\n\n> I very very frequently copy and paste name+email address out of git \n> output and into an MUA.  Have done it thousands and thousands of times, \n> and it has always worked.  I'm sure that many others do the same thing.\n\n$ git log --pretty=email\n\nafter this patch:\n\n-- snipsnap --\n\n pretty.c |    6 ++++++\n 1 files changed, 6 insertions(+), 0 deletions(-)\n\ndiff --git a/pretty.c b/pretty.c\nindex 33ef34a..ba50b54 100644\n--- a/pretty.c\n+++ b/pretty.c\n@@ -140,14 +140,20 @@ void pp_user_info(const char *what, enum cmit_fmt fmt, struct strbuf *sb,\n \tif (fmt == CMIT_FMT_EMAIL) {\n \t\tchar *name_tail = strchr(line, '<');\n \t\tint display_name_length;\n+\t\tint need_quotes;\n \t\tif (!name_tail)\n \t\t\treturn;\n \t\twhile (line < name_tail && isspace(name_tail[-1]))\n \t\t\tname_tail--;\n \t\tdisplay_name_length = name_tail - line;\n+\t\tneed_quotes = !!memchr(line, ',', display_name_length);\n \t\tfiller = \"\";\n \t\tstrbuf_addstr(sb, \"From: \");\n+\t\tif (need_quotes)\n+\t\t\tstrbuf_addch(sb, '\"');\n \t\tadd_rfc2047(sb, line, display_name_length, encoding);\n+\t\tif (need_quotes)\n+\t\t\tstrbuf_addch(sb, '\"');\n \t\tstrbuf_add(sb, name_tail, namelen - display_name_length);\n \t\tstrbuf_addch(sb, '\\n');\n \t} else {\n"},{"id":"85935","messageId":"7v4p64sa07.fsf@gitster.siamese.dyndns.org","threadId":"14786","inReplyTo":"alpine.DEB.1.00.0808012314580.9611@pacific.mpi-cbg.de.mpi-cbg.de","subject":"Re: email address handling","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2008-08-01T21:25:44Z","receivedAt":"2008-08-01T21:25:44Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:\n\n> On Fri, 1 Aug 2008, Andrew Morton wrote:\n>\n>> I very very frequently copy and paste name+email address out of git \n>> output and into an MUA.  Have done it thousands and thousands of times, \n>> and it has always worked.  I'm sure that many others do the same thing.\n\n>\n> $ git log --pretty=email\n>\n> after this patch:\n\nYou are quoting only Author: and not Signed-off-by: and Cc: that are used\nfor e-mail purposes.  I already said send-email is the right place to do\nthis kind of thing, didn't I?  Your patch makes things worse by making\nsome <name, mail> pair already quoted and some others don't.\n\nPlease don't do this.\n"},{"id":"85936","messageId":"7vvdykqub6.fsf@gitster.siamese.dyndns.org","threadId":"14786","inReplyTo":"20080801135421.5ca0f6af.akpm@linux-foundation.org","subject":"Re: email address handling","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2008-08-01T21:50:05Z","receivedAt":"2008-08-01T21:50:05Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Andrew Morton <akpm@linux-foundation.org> writes:\n\n>> The part _you_ don't seem to understand is that my point is\n>> \n>>  - git changed that \"From:\" line to an \"Author:\" line\n>> \n>>  - \"git log\" isn't an email system. It's a human-readable (and \n>>    machine-parseable, for that matter) log.\n>\n> What you're describing here is some explicit or implicit git design\n> decision and then telling me how it's implemented.\n>\n> Well, what I'm saying is that it was an incorrect design decision.\n\nWhat is the objective of your statement in this discussion?  Further add\nfuel to flame, or to seek avenues that lead to some improvement in a\nconstructive way?\n\nThe thing is, I do not think reverting that design decision is an option\nat this point.  People's repositories record <Name, Email> pair already in\n\"human readable\" form, and people's scripts are assuming that.\n\nI misspoke about git-send-email earlier; it already has sanitize_address()\nthat massages the addresses on From: To: and Cc: lines.  In fact, it even\nseems to have logic to avoid double-quoting, so it would be Ok if you\nchanged the design decision this late in the game for that particular\nscript, but that does not mean it is a good change --- other scripts\npeople may have built around git would need to change.\n\nSo the earlier patch from Dscho (Johannes) may be a step in the right\ndirection, but if we are going to rewrite the author information, (1) it\nhas to be an option, and (2) when rewriting, it should not be just From:;\nbut Signed-off-by:, Cc: and other <Name, Email> pairs at the end of the\nlog message would need similar treatment, so that you can cut and paste\nany of them to your MUA.\n"},{"id":"85938","messageId":"20080801145804.85041bbd.akpm@linux-foundation.org","threadId":"14786","inReplyTo":"7vvdykqub6.fsf@gitster.siamese.dyndns.org","subject":"Re: email address handling","fromName":"Andrew Morton","fromEmail":"akpm@linux-foundation.org","sentAt":"2008-08-01T21:58:04Z","receivedAt":"2008-08-01T21:58:04Z","isPatch":false,"sender":{"key":"akpm@linux-foundation.org","avatar":null},"body":"On Fri, 01 Aug 2008 14:50:05 -0700\nJunio C Hamano <gitster@pobox.com> wrote:\n\n> Andrew Morton <akpm@linux-foundation.org> writes:\n> \n> >> The part _you_ don't seem to understand is that my point is\n> >> \n> >>  - git changed that \"From:\" line to an \"Author:\" line\n> >> \n> >>  - \"git log\" isn't an email system. It's a human-readable (and \n> >>    machine-parseable, for that matter) log.\n> >\n> > What you're describing here is some explicit or implicit git design\n> > decision and then telling me how it's implemented.\n> >\n> > Well, what I'm saying is that it was an incorrect design decision.\n> \n> What is the objective of your statement in this discussion?  Further add\n> fuel to flame, or to seek avenues that lead to some improvement in a\n> constructive way?\n\nWell initially it was to work out why the heck my git-log output had\nstripped the quotes from that person's name, making it unusable for\nemail purposes.  I'd actually assumed that it was a bug.\n\n> The thing is, I do not think reverting that design decision is an option\n> at this point.  People's repositories record <Name, Email> pair already in\n> \"human readable\" form, and people's scripts are assuming that.\n> \n> I misspoke about git-send-email earlier; it already has sanitize_address()\n> that massages the addresses on From: To: and Cc: lines.  In fact, it even\n> seems to have logic to avoid double-quoting, so it would be Ok if you\n> changed the design decision this late in the game for that particular\n> script, but that does not mean it is a good change --- other scripts\n> people may have built around git would need to change.\n> \n> So the earlier patch from Dscho (Johannes) may be a step in the right\n> direction, but if we are going to rewrite the author information, (1) it\n> has to be an option, and (2) when rewriting, it should not be just From:;\n> but Signed-off-by:, Cc: and other <Name, Email> pairs at the end of the\n> log message would need similar treatment, so that you can cut and paste\n> any of them to your MUA.\n\nI preserve the quotes (when present) in signoffs for this exact reason.\n"},{"id":"85941","messageId":"20080801221539.GA8617@mit.edu","threadId":"14786","inReplyTo":"20080801145804.85041bbd.akpm@linux-foundation.org","subject":"Re: email address handling","fromName":"Theodore Tso","fromEmail":"tytso@mit.edu","sentAt":"2008-08-01T22:15:39Z","receivedAt":"2008-08-01T22:15:39Z","isPatch":false,"sender":{"key":"tytso@mit.edu","avatar":"https://avatars.githubusercontent.com/u/51416?v=4"},"body":"On Fri, Aug 01, 2008 at 02:58:04PM -0700, Andrew Morton wrote:\n> \n> I preserve the quotes (when present) in signoffs for this exact reason.\n> \n\nHeh.  I include quotes in my Signed-off-by:\n\nSigned-off-by: \"Theodore Ts'o\" <tytso@mit.edu>\n\nBecause I assumed the format of the DCO was an RFC-822 compliant\nheader format.  It otherwise *looks* like an RFC-822 format, so I\nassumed it should follow all of the rules, including the ones about\nquoting.\n\nHow about this as a compromise?  Git continues to store the names in\nits internal format as it always does, but there is a configuration\noption which controls whether the various Author: and Committer:\nfields when displayd by git-log are in RFC-822 format or not.  \n\n       \t    \t     \t\t       \t       - Ted\n"},{"id":"85944","messageId":"alpine.LFD.1.10.0808011507430.6819@nehalem.linux-foundation.org","threadId":"14786","inReplyTo":"20080801145804.85041bbd.akpm@linux-foundation.org","subject":"Re: email address handling","fromName":"Linus Torvalds","fromEmail":"torvalds@linux-foundation.org","sentAt":"2008-08-01T22:23:23Z","receivedAt":"2008-08-01T22:23:23Z","isPatch":false,"sender":{"key":"torvalds@linux-foundation.org","avatar":"https://avatars.githubusercontent.com/u/1024025?v=4"},"body":"\n\nOn Fri, 1 Aug 2008, Andrew Morton wrote:\n> \n> I preserve the quotes (when present) in signoffs for this exact reason.\n\nYou must be one of the few ones. According to the RFC's, you should quote \npretty much any punctuation mark, including \".\" itself. Which means that \nthings like \n\n\tSigned-off-by: David S. Miller <davem@davemloft.net>\n\nshould be quoted if they were email addresses.\n\nThat would be very irritating. \n\nIt's even _more_ irritating for things like D'Souza (or Giuseppe D'Eliseo \nto take a real example from the kernel).  For David, we could just not use \nthe \"S.\" - for others, the special characters are very much part of the \nname. It would also be very irritating for important messages like\n\n\tSigned-off-by: Linus \"I'm a moron\" Torvalds <torvalds@osdl.org>\n\netc, where it sure as heck isn't a rfc2822-compliant email address.\n\nSo the thing is, \"strict email format\" is just very annoying. Git does \nknow how to do (well, it _should_) it for \"git send-email\", but making the \nhuman-readable output ugly just because somebody might want to \ncut-and-paste it sounds really sad.\n\nYou could cut-and-paste just the stuff inside the angle branckets, though. \nThat should work.\n\n\t\tLinus\n"},{"id":"85945","messageId":"20080801152720.56dbff09.akpm@linux-foundation.org","threadId":"14786","inReplyTo":"20080801221539.GA8617@mit.edu","subject":"Re: email address handling","fromName":"Andrew Morton","fromEmail":"akpm@linux-foundation.org","sentAt":"2008-08-01T22:27:20Z","receivedAt":"2008-08-01T22:27:20Z","isPatch":false,"sender":{"key":"akpm@linux-foundation.org","avatar":null},"body":"On Fri, 1 Aug 2008 18:15:39 -0400 Theodore Tso <tytso@mit.edu> wrote:\n\n> How about this as a compromise?  Git continues to store the names in\n> its internal format as it always does, but there is a configuration\n> option which controls whether the various Author: and Committer:\n> fields when displayd by git-log are in RFC-822 format or not.  \n\nWell I believe/expect/hope that git's name+email-address transformation\ngoes via a lookup in the kernel's .mailmap file.\n\nAnd the existing .mailmap appears to have taken care that all the\n\"name\" parts are in an MUA-usable form.  There are no periods or\ncommas.\n\nSo if everyone had a .mailmap entry then\n\n- The Author: lines would all be MUA usable\n\n- The Author lines would all be in their owners' preferred form.   I mean,\n  converting\n\n\t\"Morton, Andrew\"\n\n  into\n\n\tMorton, Andrew\n\n  didn't improve things much.\n"},{"id":"85946","messageId":"alpine.LFD.1.10.0808011531290.6819@nehalem.linux-foundation.org","threadId":"14786","inReplyTo":"20080801152720.56dbff09.akpm@linux-foundation.org","subject":"Re: email address handling","fromName":"Linus Torvalds","fromEmail":"torvalds@linux-foundation.org","sentAt":"2008-08-01T22:34:16Z","receivedAt":"2008-08-01T22:34:16Z","isPatch":false,"sender":{"key":"torvalds@linux-foundation.org","avatar":"https://avatars.githubusercontent.com/u/1024025?v=4"},"body":"\n\nOn Fri, 1 Aug 2008, Andrew Morton wrote:\n> \n> And the existing .mailmap appears to have taken care that all the\n> \"name\" parts are in an MUA-usable form.  There are no periods or\n> commas.\n\nUmm. Or quotes? I don't think so. Or even periods? You must not have \nlooked at things, I found one at the very first screenful.\n\n\tEd L. Cashin <ecashin@coraid.com>\n\tPaolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>\n\tS.Çağlar Onur <caglar@pardus.org.tr>\n\nadn that's just basically ignoring the fact that we only add mailmap \nentries for people who can't get it right other ways (where admittedly \nsometimes the \"can't get it right\" comes from the people in between: poor \nÇağlar has had his name corrupted so many times that it's funny).\n\n\t\t\tLinus\n"},{"id":"85947","messageId":"alpine.LFD.1.10.0808011534260.6819@nehalem.linux-foundation.org","threadId":"14786","inReplyTo":"20080801152720.56dbff09.akpm@linux-foundation.org","subject":"Re: email address handling","fromName":"Linus Torvalds","fromEmail":"torvalds@linux-foundation.org","sentAt":"2008-08-01T22:39:37Z","receivedAt":"2008-08-01T22:39:37Z","isPatch":false,"sender":{"key":"torvalds@linux-foundation.org","avatar":"https://avatars.githubusercontent.com/u/1024025?v=4"},"body":"\n\nBtw, the real issue here is\n\n - why do you want to make things uglier and make up stupid rules that are \n   irrelevant to git, just for something that you admit you hadn't ever \n   even _noticed_ until now, and now that you know about it it's not even \n   a problem any more?\n\nespecially as\n\n - we know people won't do the quoting _anyway_, since we actually have \n   tons of examples of that in the kernel as-is. \n\nQuoting should be for _tools_, not for people. And even if we did it, we \nprobably wouldn't be fully rfc2822-compliant anyway, because anybody sane \nwould decide to not quote '@' and '.', rigth?\n\nBecause those don't actually really have special meaning (yeah, they are \n\"special\" characters in rfc-2822, but nobody cares, and the MUA can do it \nfor us, no)?\n\nSo now we'd actually not really be rfc-compliant _anyway_, because \neverybody really realizes just how annoying that would really be.\n\n\t\tLinus\n"},{"id":"85948","messageId":"20080801154137.29c96609.akpm@linux-foundation.org","threadId":"14786","inReplyTo":"alpine.LFD.1.10.0808011507430.6819@nehalem.linux-foundation.org","subject":"Re: email address handling","fromName":"Andrew Morton","fromEmail":"akpm@linux-foundation.org","sentAt":"2008-08-01T22:41:37Z","receivedAt":"2008-08-01T22:41:37Z","isPatch":false,"sender":{"key":"akpm@linux-foundation.org","avatar":null},"body":"On Fri, 1 Aug 2008 15:23:23 -0700 (PDT) Linus Torvalds <torvalds@linux-foundation.org> wrote:\n\n> \n> \n> On Fri, 1 Aug 2008, Andrew Morton wrote:\n> > \n> > I preserve the quotes (when present) in signoffs for this exact reason.\n> \n> You must be one of the few ones.\n\nNot the only one.  See d67d1c7bf948341fd8678c8e337ec27f4b46b206,\n3bf2e77453a87c22eb57ed4926760ac131c84459, ...\n\n> According to the RFC's, you should quote \n> pretty much any punctuation mark, including \".\" itself. Which means that \n> things like \n> \n> \tSigned-off-by: David S. Miller <davem@davemloft.net>\n> \n> should be quoted if they were email addresses.\n> \n> That would be very irritating. \n\nYeah, it's ugly as sin.  But it has usability benefits.  Few people\nactually need this treatment.\n\n> It's even _more_ irritating for things like D'Souza (or Giuseppe D'Eliseo \n> to take a real example from the kernel).  For David, we could just not use \n> the \"S.\" - for others, the special characters are very much part of the \n> name. It would also be very irritating for important messages like\n> \n> \tSigned-off-by: Linus \"I'm a moron\" Torvalds <torvalds@osdl.org>\n> \n> etc, where it sure as heck isn't a rfc2822-compliant email address.\n\nIt might be.  Look at this guy:\n\nFrom: Josef \"Jeff\" Sipek <jsipek@cs.sunysb.edu>\n\nWho later did an edit and became\n\nFrom: \"Josef 'Jeff' Sipek\" <jsipek@cs.sunysb.edu>\n\n> So the thing is, \"strict email format\" is just very annoying. Git does \n> know how to do (well, it _should_) it for \"git send-email\", but making the \n> human-readable output ugly just because somebody might want to \n> cut-and-paste it sounds really sad.\n\nIt didn't make human-readable output ugly.  It was already ugly and it\njust left it alone so it was still usable.\n\n> You could cut-and-paste just the stuff inside the angle branckets, though. \n> That should work.\n\nSure.  I like to include people's names though.\n\nPerhaps a suitable solution to all this would be to teach more things\nto use .mailmap transformations and to update that file more.\n\notoh, if people really want to present themselves to the world in a\nname-reversed, comma-stuffed, quote-wrapped form then that was their\nchoice..\n"},{"id":"85949","messageId":"20080801154453.921bb50f.akpm@linux-foundation.org","threadId":"14786","inReplyTo":"alpine.LFD.1.10.0808011531290.6819@nehalem.linux-foundation.org","subject":"Re: email address handling","fromName":"Andrew Morton","fromEmail":"akpm@linux-foundation.org","sentAt":"2008-08-01T22:44:53Z","receivedAt":"2008-08-01T22:44:53Z","isPatch":false,"sender":{"key":"akpm@linux-foundation.org","avatar":null},"body":"On Fri, 1 Aug 2008 15:34:16 -0700 (PDT) Linus Torvalds <torvalds@linux-foundation.org> wrote:\n\n> \n> \n> On Fri, 1 Aug 2008, Andrew Morton wrote:\n> > \n> > And the existing .mailmap appears to have taken care that all the\n> > \"name\" parts are in an MUA-usable form.  There are no periods or\n> > commas.\n> \n> Umm. Or quotes? I don't think so. Or even periods? You must not have \n> looked at things, I found one at the very first screenful.\n> \n> \tEd L. Cashin <ecashin@coraid.com>\n> \tPaolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>\n> \tS.__a__lar Onur <caglar@pardus.org.tr>\n\noh.  So .mailmap isn't usable either.  Argh.\n\nI guess it'd be fairly simple to slap quotes around anything which\ncontains fishy characters.\n\n> adn that's just basically ignoring the fact that we only add mailmap \n> entries for people who can't get it right other ways (where admittedly \n> sometimes the \"can't get it right\" comes from the people in between: poor \n> __a__lar has had his name corrupted so many times that it's funny).\n  ^^^^^^^^ (lol)\n"},{"id":"85950","messageId":"20080801154902.c60717e5.akpm@linux-foundation.org","threadId":"14786","inReplyTo":"alpine.LFD.1.10.0808011534260.6819@nehalem.linux-foundation.org","subject":"Re: email address handling","fromName":"Andrew Morton","fromEmail":"akpm@linux-foundation.org","sentAt":"2008-08-01T22:49:02Z","receivedAt":"2008-08-01T22:49:02Z","isPatch":false,"sender":{"key":"akpm@linux-foundation.org","avatar":null},"body":"On Fri, 1 Aug 2008 15:39:37 -0700 (PDT) Linus Torvalds <torvalds@linux-foundation.org> wrote:\n\n> \n> \n> Btw, the real issue here is\n> \n>  - why do you want to make things uglier and make up stupid rules that are \n>    irrelevant to git, just for something that you admit you hadn't ever \n>    even _noticed_ until now, and now that you know about it it's not even \n>    a problem any more?\n\nNone of that is correct.\n\nThe real issue here is:\n\n - Why do you want to take usable RFC-compliant email addresses and\n   mangle them in a manner which still doesn't match the person's\n   actual name and which makes unsuspecting users of git potentially\n   lose important email communications?\n\nAin't framing great?\n\n> especially as\n> \n>  - we know people won't do the quoting _anyway_, since we actually have \n>    tons of examples of that in the kernel as-is. \n> \n> Quoting should be for _tools_, not for people. And even if we did it, we \n> probably wouldn't be fully rfc2822-compliant anyway, because anybody sane \n> would decide to not quote '@' and '.', rigth?\n> \n> Because those don't actually really have special meaning (yeah, they are \n> \"special\" characters in rfc-2822, but nobody cares, and the MUA can do it \n> for us, no)?\n> \n> So now we'd actually not really be rfc-compliant _anyway_, because \n> everybody really realizes just how annoying that would really be.\n> \n\nLinus, just admit it: copying and pasting from git-log output into the MUA\nis *useful*.  And you've made it less reliable.\n"},{"id":"85951","messageId":"alpine.LFD.1.10.0808011543500.6819@nehalem.linux-foundation.org","threadId":"14786","inReplyTo":"alpine.LFD.1.10.0808011531290.6819@nehalem.linux-foundation.org","subject":"Re: email address handling","fromName":"Linus Torvalds","fromEmail":"torvalds@linux-foundation.org","sentAt":"2008-08-01T22:49:43Z","receivedAt":"2008-08-01T22:49:43Z","isPatch":false,"sender":{"key":"torvalds@linux-foundation.org","avatar":"https://avatars.githubusercontent.com/u/1024025?v=4"},"body":"\n\nOn Fri, 1 Aug 2008, Linus Torvalds wrote:\n> \n> \tS.Çağlar Onur <caglar@pardus.org.tr>\n\nBtw, poor guy is _really_ screwed. He'd show up as\n\n\t\"=?utf-8?q?S=2E=C3=87a=C4=9Flar?= Onur\" <caglar@pardus.org.tr>\n\nwhich must really hurt.\n\nCan you not see how STUPID it would be to say that the name should be \nshown as an email encoding requires it?\n\nReally. Just admit that you were wrong. The fact is, asking for rfc2822 \nencoding in logs etc is a HORRIBLY HORRIBLY stupid thing to do.\n\nWhat you really want was just something you could cut-and-paste into your \nmailer. Which actually means that the only special character is probably \n\",\", and your claims of how bad the design was that it didn't leave the \ntotal mess that rfc2822 is was actually not true, and was based on simply \nnot knowing how nasty the real world is...\n\nQuote frankly, If I had one of the Finnish special characters in my name, \nI'd piss on your grave if you suggested that. Try to guess what something \nlike\n\n\t =?ISO-8859-15?Q?Linus_T=F6rnqvist?= <torvalds@linux-foundation.org>\n\nis supposed to be.\n\n\t\t\tLinus\n"},{"id":"85953","messageId":"alpine.LFD.1.10.0808011550450.6819@nehalem.linux-foundation.org","threadId":"14786","inReplyTo":"20080801154453.921bb50f.akpm@linux-foundation.org","subject":"Re: email address handling","fromName":"Linus Torvalds","fromEmail":"torvalds@linux-foundation.org","sentAt":"2008-08-01T22:52:36Z","receivedAt":"2008-08-01T22:52:36Z","isPatch":false,"sender":{"key":"torvalds@linux-foundation.org","avatar":"https://avatars.githubusercontent.com/u/1024025?v=4"},"body":"\n\nOn Fri, 1 Aug 2008, Andrew Morton wrote:\n> > \tS.__a__lar Onur <caglar@pardus.org.tr>\n> \n> oh.  So .mailmap isn't usable either.  Argh.\n\nBtw, your mailer really is broken. It seems to have turned my correct \nutf-8 email into US-ASCII. \n\nOr at least it was correct when it came back to me. I don't see the \ncorruption. But your mailer seems to be unable to handle any complex \ncharacter sets and did\n\n\tX-Mailer: Sylpheed 2.4.8 (GTK+ 2.12.5; x86_64-redhat-linux-gnu)\n\tMime-Version: 1.0\n\tContent-Type: text/plain; charset=US-ASCII\n\nand I wonder why?\n\nYeah, I feel superior, because alpine actually gets things right these \ndays. I too used to be character-set-confused.\n\n\t\t\tLinus\n"},{"id":"85954","messageId":"alpine.LFD.1.10.0808011554350.6819@nehalem.linux-foundation.org","threadId":"14786","inReplyTo":"20080801154902.c60717e5.akpm@linux-foundation.org","subject":"Re: email address handling","fromName":"Linus Torvalds","fromEmail":"torvalds@linux-foundation.org","sentAt":"2008-08-01T22:55:40Z","receivedAt":"2008-08-01T22:55:40Z","isPatch":false,"sender":{"key":"torvalds@linux-foundation.org","avatar":"https://avatars.githubusercontent.com/u/1024025?v=4"},"body":"\n\nOn Fri, 1 Aug 2008, Andrew Morton wrote:\n> \n> Linus, just admit it: copying and pasting from git-log output into the MUA\n> is *useful*.  And you've made it less reliable.\n\nOh, I admit it is useful.\n\nBut your \"solution\" is actually MUCH MUCH MUCH worse than what git does.\n\nThat's my argument here. Life is tough.  Not everthing is going to be \neasy. Your solution would \"work\", but it would be a horrid piece of crap.\n\n\t\tLinus\n"},{"id":"85955","messageId":"20080801160000.0626c931.akpm@linux-foundation.org","threadId":"14786","inReplyTo":"alpine.LFD.1.10.0808011550450.6819@nehalem.linux-foundation.org","subject":"Re: email address handling","fromName":"Andrew Morton","fromEmail":"akpm@linux-foundation.org","sentAt":"2008-08-01T23:00:00Z","receivedAt":"2008-08-01T23:00:00Z","isPatch":false,"sender":{"key":"akpm@linux-foundation.org","avatar":null},"body":"On Fri, 1 Aug 2008 15:52:36 -0700 (PDT) Linus Torvalds <torvalds@linux-foundation.org> wrote:\n\n> \n> \n> On Fri, 1 Aug 2008, Andrew Morton wrote:\n> > > \tS.__a__lar Onur <caglar@pardus.org.tr>\n> > \n> > oh.  So .mailmap isn't usable either.  Argh.\n> \n> Btw, your mailer really is broken. It seems to have turned my correct \n> utf-8 email into US-ASCII. \n> \n> Or at least it was correct when it came back to me. I don't see the \n> corruption. But your mailer seems to be unable to handle any complex \n> character sets and did\n> \n> \tX-Mailer: Sylpheed 2.4.8 (GTK+ 2.12.5; x86_64-redhat-linux-gnu)\n> \tMime-Version: 1.0\n> \tContent-Type: text/plain; charset=US-ASCII\n> \n> and I wonder why?\n> \n> Yeah, I feel superior, because alpine actually gets things right these \n> days. I too used to be character-set-confused.\n> \n\nsylpheed.  If you use its internal editor it mostly gets things right. \nBut if you use its use-external-editor feature it messes up those\nthings when saving out to its temporary file.  And it was written by a\nJapanese guy.\n\nI'll often fix it in changelogs by re-editing the changelog and doing\na copy-n-paste from sylpheed's display window into the editor, which\ndoes work.  All a bit of a pain though.\n"},{"id":"85957","messageId":"alpine.LFD.1.10.0808011608150.6819@nehalem.linux-foundation.org","threadId":"14786","inReplyTo":"alpine.LFD.1.10.0808011554350.6819@nehalem.linux-foundation.org","subject":"Re: email address handling","fromName":"Linus Torvalds","fromEmail":"torvalds@linux-foundation.org","sentAt":"2008-08-01T23:16:39Z","receivedAt":"2008-08-01T23:16:39Z","isPatch":false,"sender":{"key":"torvalds@linux-foundation.org","avatar":"https://avatars.githubusercontent.com/u/1024025?v=4"},"body":"\n\nOn Fri, 1 Aug 2008, Linus Torvalds wrote:\n>\n> That's my argument here. Life is tough.  Not everthing is going to be \n> easy. Your solution would \"work\", but it would be a horrid piece of crap.\n\n..and I really think that the\n\n\t\"=?utf-8?q?S=2E=C3=87a=C4=9Flar?= Onur\" <caglar@pardus.org.tr>\n\nexample should be the one that makes you say \"Ok, you're right\".\n\nThe undeniable fact is, if we kept things in that format, even your broken \nmailer wouldn't have corrupted it. You could cut-and-paste things, and \nthey's show up correctly at the other end, regardless of whether the \nproblem is with your mailer or with the cut-and-paste, or anything else.\n\nSo clearly, \"=?utf-8?q?S=2E=C3=87a=C4=9Flar?= Onur\" _must_ be the superior \nformat that git should have used, no?\n\nBecause clearly that is the most automation-friendly thing that _never_ \nrequires anybody to think at all, and you can cut-and-paste it between \nprograms without ever having to worry about anything at all. No special \ncharacters, no special meanings, no need to worry about limitations of \nimplementation.\n\nSo the fact that git completely FUCKS IT UP, and when you do 'git log' git \nwill have corrupted this to\n\n\tAuthor: S.Çağlar Onur <caglar@pardus.org.tr>\n\nis clearly git doing the wrong thing. Right?\n\nWRONG.\n\nThe fact is, git does the right thing. And yes, it means that you cannot \njust blindly cut-and-paste. And yes, it means that your mailer actually \nhas to work right for you to even -see- the right email address. And yes, \nit means that any number of things can screw up, and corrupt it.\n\nBut it is STILL the right thing. Because what matters more than your \nability to cut-and-paste or anything like that is  the fact that we should \nmake things look sane.\n\nThe thing is, you can actually get git to output the crazy names. Just do\n\n\tgit show --pretty=email 37a4c940749670671adab211a2d9c9fed9f3f757\n\nand now you get the email-prettified thing for at least the author. No, \ngit won't corrupt the actual message, so the Signed-off-by: lines will \nstill show Çağlar's first name, but you can actually get back that odd \nformat.\n\n(In fact, --pretty=email will do it as\n\n\tFrom: =?utf-8?q?S.=C3=87a=C4=9Flar=20Onur?= <caglar@pardus.org.tr>\n\nwhich is admittedy _even_uglier_, but whatever.. The difference between \nreally f*cking ugly and really f*cking uglier is not really relevant).\n\n\t\t\tLinus\n"},{"id":"85972","messageId":"alpine.DEB.1.00.0808021300420.9611@pacific.mpi-cbg.de.mpi-cbg.de","threadId":"14786","inReplyTo":"7v4p64sa07.fsf@gitster.siamese.dyndns.org","subject":"Re: email address handling","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2008-08-02T11:03:22Z","receivedAt":"2008-08-02T11:03:22Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Fri, 1 Aug 2008, Junio C Hamano wrote:\n\n> Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:\n> \n> > On Fri, 1 Aug 2008, Andrew Morton wrote:\n> >\n> >> I very very frequently copy and paste name+email address out of git \n> >> output and into an MUA.  Have done it thousands and thousands of times, \n> >> and it has always worked.  I'm sure that many others do the same thing.\n> \n> >\n> > $ git log --pretty=email\n> >\n> > after this patch:\n> \n> You are quoting only Author: and not Signed-off-by: and Cc: that are used\n> for e-mail purposes.\n\nYou might have realized that this was not a proper patch with a commit \nmessage and a SOB?\n\nAs for Cc: I agree.  But not for S-O-B: this is not an email header.  And \nI was very specific in only changing the behavior for \"pretty=email\".\n\nAt least _I_ was surprised that pretty=email did not behave as if it was \noutputting email headers.\n\nI agree with Linus for pretty=non-email, but not at all for pretty=email.\n\n> I already said send-email is the right place to do this kind of thing, \n> didn't I?\n\nFor the given scenario send-email is completely irrelevant.\n\nCiao,\nDscho\n"},{"id":"85974","messageId":"alpine.DEB.1.00.0808021321500.9611@pacific.mpi-cbg.de.mpi-cbg.de","threadId":"14786","inReplyTo":"alpine.LFD.1.10.0808011608150.6819@nehalem.linux-foundation.org","subject":"Re: email address handling","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2008-08-02T11:31:34Z","receivedAt":"2008-08-02T11:31:34Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Fri, 1 Aug 2008, Linus Torvalds wrote:\n\n> The thing is, you can actually get git to output the crazy names. Just \n> do\n> \n> \tgit show --pretty=email 37a4c940749670671adab211a2d9c9fed9f3f757\n> \n> and now you get the email-prettified thing for at least the author.\n\nAh, there lies the rub (you forgot that the original complaint was about \na comma, and pretty=email does not handle those):\n\n-- snipsnap --\n\n pretty.c |    5 +++--\n 1 files changed, 3 insertions(+), 2 deletions(-)\n\ndiff --git a/pretty.c b/pretty.c\nindex 33ef34a..9db0333 100644\n--- a/pretty.c\n+++ b/pretty.c\n@@ -79,7 +79,8 @@ int non_ascii(int ch)\n \n static int is_rfc2047_special(char ch)\n {\n-\treturn (non_ascii(ch) || (ch == '=') || (ch == '?') || (ch == '_'));\n+\treturn (non_ascii(ch) || (ch == '=') || (ch == '?') || (ch == '_') ||\n+\t\t(ch == ',') || (ch == '\"') || (ch == '\\''));\n }\n \n static void add_rfc2047(struct strbuf *sb, const char *line, int len,\n@@ -89,7 +90,7 @@ static void add_rfc2047(struct strbuf *sb, const char *line, int len,\n \n \tfor (i = 0; i < len; i++) {\n \t\tint ch = line[i];\n-\t\tif (non_ascii(ch))\n+\t\tif (is_rfc2047_special(ch))\n \t\t\tgoto needquote;\n \t\tif ((i + 1 < len) && (ch == '=' && line[i+1] == '?'))\n \t\t\tgoto needquote;\n"},{"id":"85984","messageId":"alpine.LFD.1.10.0808020916370.3318@nehalem.linux-foundation.org","threadId":"14786","inReplyTo":"alpine.DEB.1.00.0808021321500.9611@pacific.mpi-cbg.de.mpi-cbg.de","subject":"Re: email address handling","fromName":"Linus Torvalds","fromEmail":"torvalds@linux-foundation.org","sentAt":"2008-08-02T16:20:17Z","receivedAt":"2008-08-02T16:20:17Z","isPatch":false,"sender":{"key":"torvalds@linux-foundation.org","avatar":"https://avatars.githubusercontent.com/u/1024025?v=4"},"body":"\n\nOn Sat, 2 Aug 2008, Johannes Schindelin wrote:\n> \n> Ah, there lies the rub (you forgot that the original complaint was about \n> a comma, and pretty=email does not handle those):\n\nIndeed.\n\nI wonder where that is_rfc2047_special() function came from.  The list of \n\"special\" characters is totally bogus.\n\nThe real RFC has comma, but it has a lot of other characters too:\n\n  especials = \"(\" / \")\" / \"<\" / \">\" / \"@\" / \",\" / \";\" / \":\" /\n              \"<\" / \"> / \"/\" / \"[\" / \"]\" / \"?\" / \".\" / \"=\"\n\nbecause basically the rfc2047 encoding has to be a superset of the 822 \n(and later 2822) encodings.\n\n\t\tLinus\n"},{"id":"85985","messageId":"7vej57pe5q.fsf@gitster.siamese.dyndns.org","threadId":"14786","inReplyTo":"alpine.LFD.1.10.0808020916370.3318@nehalem.linux-foundation.org","subject":"Re: email address handling","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2008-08-02T16:36:33Z","receivedAt":"2008-08-02T16:36:33Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Linus Torvalds <torvalds@linux-foundation.org> writes:\n\n> On Sat, 2 Aug 2008, Johannes Schindelin wrote:\n>> \n>> Ah, there lies the rub (you forgot that the original complaint was about \n>> a comma, and pretty=email does not handle those):\n>\n> Indeed.\n>\n> I wonder where that is_rfc2047_special() function came from.\n\nIt came from the earlier patch from Dscho I rejected yesterday ;-)\n"},{"id":"85986","messageId":"7vabfvpdyk.fsf@gitster.siamese.dyndns.org","threadId":"14786","inReplyTo":"alpine.LFD.1.10.0808020916370.3318@nehalem.linux-foundation.org","subject":"Re: email address handling","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2008-08-02T16:40:51Z","receivedAt":"2008-08-02T16:40:51Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Linus Torvalds <torvalds@linux-foundation.org> writes:\n\n> On Sat, 2 Aug 2008, Johannes Schindelin wrote:\n>> \n>> Ah, there lies the rub (you forgot that the original complaint was about \n>> a comma, and pretty=email does not handle those):\n>\n> Indeed.\n>\n> I wonder where that is_rfc2047_special() function came from.  The list of \n> \"special\" characters is totally bogus.\n\nThis function is about quoting inside dq pair, so the function does not\nlook at the set you listed.  It is about quoting non-ascii chars using the\n?charset?Q? or ?charset?B? notation.\n\nIf we want to use double quotes that should be done elsewhere, not in that\nfunction.\n"},{"id":"85987","messageId":"7v3alnpdwc.fsf@gitster.siamese.dyndns.org","threadId":"14786","inReplyTo":"7vabfvpdyk.fsf@gitster.siamese.dyndns.org","subject":"Re: email address handling","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2008-08-02T16:42:11Z","receivedAt":"2008-08-02T16:42:11Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Junio C Hamano <gitster@pobox.com> writes:\n\n> Linus Torvalds <torvalds@linux-foundation.org> writes:\n>\n>> On Sat, 2 Aug 2008, Johannes Schindelin wrote:\n>>> \n>>> Ah, there lies the rub (you forgot that the original complaint was about \n>>> a comma, and pretty=email does not handle those):\n>>\n>> Indeed.\n>>\n>> I wonder where that is_rfc2047_special() function came from.  The list of \n>> \"special\" characters is totally bogus.\n>\n> This function is about quoting inside dq pair, so the function does not\n\ns/is about/is NOT about/;\n\nSorry, I should grab coffee before continuing.\n\n> look at the set you listed.  It is about quoting non-ascii chars using the\n> ?charset?Q? or ?charset?B? notation.\n>\n> If we want to use double quotes that should be done elsewhere, not in that\n> function.\n"},{"id":"85988","messageId":"alpine.DEB.1.00.0808021857350.9611@pacific.mpi-cbg.de.mpi-cbg.de","threadId":"14786","inReplyTo":"7vej57pe5q.fsf@gitster.siamese.dyndns.org","subject":"Re: email address handling","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2008-08-02T16:59:50Z","receivedAt":"2008-08-02T16:59:50Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Sat, 2 Aug 2008, Junio C Hamano wrote:\n\n> Linus Torvalds <torvalds@linux-foundation.org> writes:\n> \n> > I wonder where that is_rfc2047_special() function came from.\n\nIt comes straight from cdd406e(CMIT_FMT_EMAIL: Q-encode Subject: and \ndisplay-name part of From: fields.).\n\nCiao,\nDscho\n"},{"id":"85989","messageId":"alpine.LFD.1.10.0808021004050.3318@nehalem.linux-foundation.org","threadId":"14786","inReplyTo":"alpine.DEB.1.00.0808021857350.9611@pacific.mpi-cbg.de.mpi-cbg.de","subject":"Re: email address handling","fromName":"Linus Torvalds","fromEmail":"torvalds@linux-foundation.org","sentAt":"2008-08-02T17:08:03Z","receivedAt":"2008-08-02T17:08:03Z","isPatch":false,"sender":{"key":"torvalds@linux-foundation.org","avatar":"https://avatars.githubusercontent.com/u/1024025?v=4"},"body":"\n\nOn Sat, 2 Aug 2008, Johannes Schindelin wrote:\n\n> Hi,\n> \n> On Sat, 2 Aug 2008, Junio C Hamano wrote:\n> \n> > Linus Torvalds <torvalds@linux-foundation.org> writes:\n> > \n> > > I wonder where that is_rfc2047_special() function came from.\n> \n> It comes straight from cdd406e(CMIT_FMT_EMAIL: Q-encode Subject: and \n> display-name part of From: fields.).\n\nThat's not what I meant.\n\nI meant \"what drugs induced somebody to write that function and give it \nthat name, since it clearly has never seen rfc2047, and has nothing to do \nwith it\".\n\nIn other words, it sure as hell didn't come from the rfc2047 in this \nuniverse, so it must have come from some exciting alternate alien universe \nwith different laws of nature and internet.\n\nOr maybe there's just another rfc2047 that I've not heard of.\n\n\t\tLinus\n"},{"id":"85993","messageId":"7vabfvnw5j.fsf@gitster.siamese.dyndns.org","threadId":"14786","inReplyTo":"alpine.LFD.1.10.0808020916370.3318@nehalem.linux-foundation.org","subject":"Re: email address handling","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2008-08-02T17:50:48Z","receivedAt":"2008-08-02T17:50:48Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Linus Torvalds <torvalds@linux-foundation.org> writes:\n\n> On Sat, 2 Aug 2008, Johannes Schindelin wrote:\n>> \n>> Ah, there lies the rub (you forgot that the original complaint was about \n>> a comma, and pretty=email does not handle those):\n>\n> Indeed.\n>\n> I wonder where that is_rfc2047_special() function came from.  The list of \n> \"special\" characters is totally bogus.\n>\n> The real RFC has comma, but it has a lot of other characters too:\n>\n>   especials = \"(\" / \")\" / \"<\" / \">\" / \"@\" / \",\" / \";\" / \":\" /\n>               \"<\" / \"> / \"/\" / \"[\" / \"]\" / \"?\" / \".\" / \"=\"\n>\n> because basically the rfc2047 encoding has to be a superset of the 822 \n> (and later 2822) encodings.\n\nHmm, you're right.  This has to be trickier than I originally thought it\nwould be ... ;-)\n"},{"id":"86219","messageId":"20080804201450.GA15751@diana.vm.bytemark.co.uk","threadId":"14786","inReplyTo":"alpine.LFD.1.10.0808011543500.6819@nehalem.linux-foundation.org","subject":"Re: email address handling","fromName":"Karl Hasselström","fromEmail":"kha@treskal.com","sentAt":"2008-08-04T20:14:50Z","receivedAt":"2008-08-04T20:14:50Z","isPatch":false,"sender":{"key":"kha@treskal.com","avatar":"https://gravatar.com/avatar/f0120c734b5279b345075a28521e1ac66acb20c9913ffe9bf6ae97e53f7f3f13?d=mp&s=160"},"body":"On 2008-08-01 15:49:43 -0700, Linus Torvalds wrote:\n\n> Try to guess what something like\n>\n>      =?ISO-8859-15?Q?Linus_T=F6rnqvist?= <torvalds@linux-foundation.org>\n>\n> is supposed to be.\n\nVery readable to me. Because every so often some piece of software\nreminds me that the ö in my name is 0xf6 in latin1/9 ...\n\n-- \nKarl Hasselström, kha@treskal.com\n      www.treskal.com/kalle\n"}]}