{"thread":{"id":"12861","subject":"[PATCH 2/2] send-email: rfc2047-quote subject lines with non-ascii characters","startedAt":"2008-03-25T23:03:21Z","lastAt":"2008-03-27T19:44:57Z","messageCount":11,"participants":["Jeff King","Teemu Likonen","Todd Zullinger"],"isPatch":true,"patchVersion":1,"patchTotal":2},"messages":[{"id":"73080","messageId":"20080325230321.GB17744@coredump.intra.peff.net","threadId":"12861","inReplyTo":"7caf19ae394accab538d2f94953bb62b55a2c79f.1206486012.git.peff@peff.net","subject":"[PATCH 2/2] send-email: rfc2047-quote subject lines with non-ascii characters","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2008-03-25T23:03:21Z","receivedAt":"2008-03-25T23:03:21Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"We always use 'utf-8' as the encoding, since we currently\nhave no way of getting the information from the user.\n\nThis also refactors the quoting of recipient names, since\nboth processes can share the rfc2047 quoting code.\n\nSigned-off-by: Jeff King <peff@peff.net>\n---\n git-send-email.perl   |   18 +++++++++++++++---\n t/t9001-send-email.sh |   15 +++++++++++++++\n 2 files changed, 30 insertions(+), 3 deletions(-)\n\ndiff --git a/git-send-email.perl b/git-send-email.perl\nindex 7c4f06c..075cd0b 100755\n--- a/git-send-email.perl\n+++ b/git-send-email.perl\n@@ -501,7 +501,12 @@ if ($compose) {\n \topen(C,\">\",$compose_filename)\n \t\tor die \"Failed to open for writing $compose_filename: $!\";\n \tprint C \"From $sender # This line is ignored.\\n\";\n-\tprintf C \"Subject: %s\\n\\n\", $initial_subject;\n+\tprint C \"Subject: \",\n+\t\t($initial_subject =~ /[^[:ascii:]]/ ?\n+\t\tquote_rfc2047($initial_subject) :\n+\t\t$initial_subject),\n+\t\t\"\\n\";\n+\tprint C \"\\n\";\n \tprintf C <<EOT;\n GIT: Please enter your email below.\n GIT: Lines beginning in \"GIT: \" will be removed.\n@@ -626,6 +631,14 @@ sub unquote_rfc2047 {\n \treturn wantarray ? ($_, $encoding) : $_;\n }\n \n+sub quote_rfc2047 {\n+\tlocal $_ = shift;\n+\tmy $encoding = shift || 'utf-8';\n+\ts/([^-a-zA-Z0-9!*+\\/])/sprintf(\"=%02X\", ord($1))/eg;\n+\ts/(.*)/=\\?$encoding\\?q\\?$1\\?=/;\n+\treturn $_;\n+}\n+\n # use the simplest quoting being able to handle the recipient\n sub sanitize_address\n {\n@@ -643,8 +656,7 @@ sub sanitize_address\n \n \t# rfc2047 is needed if a non-ascii char is included\n \tif ($recipient_name =~ /[^[:ascii:]]/) {\n-\t\t$recipient_name =~ s/([^-a-zA-Z0-9!*+\\/])/sprintf(\"=%02X\", ord($1))/eg;\n-\t\t$recipient_name =~ s/(.*)/=\\?utf-8\\?q\\?$1\\?=/;\n+\t\t$recipient_name = quote_rfc2047($recipient_name);\n \t}\n \n \t# double quotes are needed if specials or CTLs are included\ndiff --git a/t/t9001-send-email.sh b/t/t9001-send-email.sh\nindex e222c49..a4bcd28 100755\n--- a/t/t9001-send-email.sh\n+++ b/t/t9001-send-email.sh\n@@ -210,4 +210,19 @@ test_expect_success '--compose respects user mime type' '\n \t! grep \"^Content-Type: text/plain; charset=utf-8\" msgtxt1\n '\n \n+test_expect_success '--compose adds MIME for utf8 subject' '\n+\tclean_fake_sendmail &&\n+\techo y | \\\n+\t  GIT_EDITOR=$(pwd)/fake-editor \\\n+\t  GIT_SEND_EMAIL_NOTTY=1 \\\n+\t  git send-email \\\n+\t  --compose --subject utf8-sübjëct \\\n+\t  --from=\"Example <nobody@example.com>\" \\\n+\t  --to=nobody@example.com \\\n+\t  --smtp-server=\"$(pwd)/fake.sendmail\" \\\n+\t  $patches &&\n+\tgrep \"^fake edit\" msgtxt1 &&\n+\tgrep \"^Subject: =?utf-8?q?utf8-s=C3=BCbj=C3=ABct?=\" msgtxt1\n+'\n+\n test_done\n-- \n1.5.5.rc1.123.ge5f4e6\n"},{"id":"73112","messageId":"200803260759.48922.tlikonen@iki.fi","threadId":"12861","inReplyTo":"20080325230321.GB17744@coredump.intra.peff.net","subject":"Re: [PATCH 2/2] send-email: rfc2047-quote subject lines with non-ascii characters","fromName":"Teemu Likonen","fromEmail":"tlikonen@iki.fi","sentAt":"2008-03-26T05:59:48Z","receivedAt":"2008-03-26T05:59:48Z","isPatch":true,"sender":{"key":"tlikonen@iki.fi","avatar":null},"body":"Jeff King kirjoitti:\n\n> We always use 'utf-8' as the encoding, since we currently\n> have no way of getting the information from the user.\n>\n> This also refactors the quoting of recipient names, since\n> both processes can share the rfc2047 quoting code.\n\nThese patches seem to work except that the quoting of Subject field \nworks only if user types a non-Ascii text to the \"What subject should \nthe initial email start with?\" prompt. If she changes the subject in \neditor it won't be rfc2047-quoted.\n\nThank you anyway, I think we're going to right direction. I think 'git \nsend-mail --compose' is nice way to produce introductory message to \npatch series. If --compose doesn't support MIME encoding reasonable \nway, user may have to write and send intro message with real MUA and \nfind out the Message-Id for correct In-Reply-To field for the actual \npatch series.\n\nE-mail agents KMail and Mutt have setting for preferred encodings for \noutgoing mail. It's a list of encodings, \nlike \"us-ascii,iso-8859-1,utf-8\". The first one that fits (including \nFrom, To, Cc, Subject, the body, ...?) is used, so there is some kind \nof detection of content after the message has been composed.\n\nIf portable content encoding detection is difficult or considered \nunnecessary, then I think a documented configurable option is fine \n(UTF-8 by default).\n"},{"id":"73114","messageId":"20080326062029.GA26286@coredump.intra.peff.net","threadId":"12861","inReplyTo":"200803260759.48922.tlikonen@iki.fi","subject":"Re: [PATCH 2/2] send-email: rfc2047-quote subject lines with non-ascii characters","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2008-03-26T06:20:29Z","receivedAt":"2008-03-26T06:20:29Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Wed, Mar 26, 2008 at 07:59:48AM +0200, Teemu Likonen wrote:\n\n> These patches seem to work except that the quoting of Subject field \n> works only if user types a non-Ascii text to the \"What subject should \n> the initial email start with?\" prompt. If she changes the subject in \n> editor it won't be rfc2047-quoted.\n\nAh, yes, I hadn't considered that. We should definitely do the quoting\nafter all of the user's input. Replace 2/2 from my series with the patch\nbelow, which handles this case correctly (and as a bonus, the user sees\nthe unencoded subject in the editor, which is much more readable).\n\n> Thank you anyway, I think we're going to right direction. I think 'git \n> send-mail --compose' is nice way to produce introductory message to \n> patch series. If --compose doesn't support MIME encoding reasonable \n> way, user may have to write and send intro message with real MUA and \n> find out the Message-Id for correct In-Reply-To field for the actual \n> patch series.\n\ngit-format-patch recently got a --cover-letter option which does the\nsame thing. I actually use a real MUA (mutt) instead of send-email, and\nthis way you can avoid the message-id cutting and pasting that is\nrequired. It automatically does the right thing with encodings because I\nend up sending the message using my MUA.\n\n> E-mail agents KMail and Mutt have setting for preferred encodings for \n> outgoing mail. It's a list of encodings, \n> like \"us-ascii,iso-8859-1,utf-8\". The first one that fits (including \n> From, To, Cc, Subject, the body, ...?) is used, so there is some kind \n> of detection of content after the message has been composed.\n\nYes, the git-send-email code is a real mess for this sort of thing. I\nthink it started very small and specific, and has gotten hack upon hack\npiled on it. It would be much nicer rewritten from scratch around one of\nthe many abstracted perl mail objects (though that does introduce a new\ndependency).\n\n> If portable content encoding detection is difficult or considered \n> unnecessary, then I think a documented configurable option is fine \n> (UTF-8 by default).\n\nI think that is sensible. Want to try adding it on top of my patches?\n\nBelow is the revised subject-munging patch.\n\n-- >8 --\nsend-email: rfc2047-quote subject lines with non-ascii characters\n\nWe always use 'utf-8' as the encoding, since we currently\nhave no way of getting the information from the user.\n\nThis also refactors the quoting of recipient names, since\nboth processes can share the rfc2047 quoting code.\n\nSigned-off-by: Jeff King <peff@peff.net>\n---\n git-send-email.perl   |   20 ++++++++++++++++++--\n t/t9001-send-email.sh |   15 +++++++++++++++\n 2 files changed, 33 insertions(+), 2 deletions(-)\n\ndiff --git a/git-send-email.perl b/git-send-email.perl\nindex 7c4f06c..3694f81 100755\n--- a/git-send-email.perl\n+++ b/git-send-email.perl\n@@ -536,6 +536,15 @@ EOT\n \t\tif (!$in_body && /^MIME-Version:/i) {\n \t\t\t$need_8bit_cte = 0;\n \t\t}\n+\t\tif (!$in_body && /^Subject: ?(.*)/i) {\n+\t\t\tmy $subject = $1;\n+\t\t\t$_ = \"Subject: \" .\n+\t\t\t\t($subject =~ /[^[:ascii:]]/ ?\n+\t\t\t\t quote_rfc2047($subject) :\n+\t\t\t\t $subject) .\n+\t\t\t\t\"\\n\";\n+\t\t\t}\n+\t\t}\n \t\tprint C2 $_;\n \t}\n \tclose(C);\n@@ -626,6 +635,14 @@ sub unquote_rfc2047 {\n \treturn wantarray ? ($_, $encoding) : $_;\n }\n \n+sub quote_rfc2047 {\n+\tlocal $_ = shift;\n+\tmy $encoding = shift || 'utf-8';\n+\ts/([^-a-zA-Z0-9!*+\\/])/sprintf(\"=%02X\", ord($1))/eg;\n+\ts/(.*)/=\\?$encoding\\?q\\?$1\\?=/;\n+\treturn $_;\n+}\n+\n # use the simplest quoting being able to handle the recipient\n sub sanitize_address\n {\n@@ -643,8 +660,7 @@ sub sanitize_address\n \n \t# rfc2047 is needed if a non-ascii char is included\n \tif ($recipient_name =~ /[^[:ascii:]]/) {\n-\t\t$recipient_name =~ s/([^-a-zA-Z0-9!*+\\/])/sprintf(\"=%02X\", ord($1))/eg;\n-\t\t$recipient_name =~ s/(.*)/=\\?utf-8\\?q\\?$1\\?=/;\n+\t\t$recipient_name = quote_rfc2047($recipient_name);\n \t}\n \n \t# double quotes are needed if specials or CTLs are included\ndiff --git a/t/t9001-send-email.sh b/t/t9001-send-email.sh\nindex e222c49..a4bcd28 100755\n--- a/t/t9001-send-email.sh\n+++ b/t/t9001-send-email.sh\n@@ -210,4 +210,19 @@ test_expect_success '--compose respects user mime type' '\n \t! grep \"^Content-Type: text/plain; charset=utf-8\" msgtxt1\n '\n \n+test_expect_success '--compose adds MIME for utf8 subject' '\n+\tclean_fake_sendmail &&\n+\techo y | \\\n+\t  GIT_EDITOR=$(pwd)/fake-editor \\\n+\t  GIT_SEND_EMAIL_NOTTY=1 \\\n+\t  git send-email \\\n+\t  --compose --subject utf8-sübjëct \\\n+\t  --from=\"Example <nobody@example.com>\" \\\n+\t  --to=nobody@example.com \\\n+\t  --smtp-server=\"$(pwd)/fake.sendmail\" \\\n+\t  $patches &&\n+\tgrep \"^fake edit\" msgtxt1 &&\n+\tgrep \"^Subject: =?utf-8?q?utf8-s=C3=BCbj=C3=ABct?=\" msgtxt1\n+'\n+\n test_done\n-- \n1.5.5.rc1.123.ge5f4e6\n"},{"id":"73126","messageId":"20080326083033.GA13933@mithlond.arda.local","threadId":"12861","inReplyTo":"20080326062029.GA26286@coredump.intra.peff.net","subject":"Re: [PATCH 2/2] send-email: rfc2047-quote subject lines with non-ascii characters","fromName":"Teemu Likonen","fromEmail":"tlikonen@iki.fi","sentAt":"2008-03-26T08:30:33Z","receivedAt":"2008-03-26T08:30:33Z","isPatch":true,"sender":{"key":"tlikonen@iki.fi","avatar":null},"body":"Jeff King wrote:\n\n> On Wed, Mar 26, 2008 at 07:59:48AM +0200, Teemu Likonen wrote:\n> > These patches seem to work except that the quoting of Subject field\n> > works only if user types a non-Ascii text to the \"What subject\n> > should the initial email start with?\" prompt. If she changes the\n> > subject in editor it won't be rfc2047-quoted.\n>\n> Ah, yes, I hadn't considered that. We should definitely do the quoting\n> after all of the user's input. Replace 2/2 from my series with the\n> patch below, which handles this case correctly (and as a bonus, the\n> user sees the unencoded subject in the editor, which is much more\n> readable).\n\nIt seems to work nicely after I fixed one unmatching bracket. See below.\n\n> git-format-patch recently got a --cover-letter option which does the\n> same thing. I actually use a real MUA (mutt) instead of send-email,\n> and this way you can avoid the message-id cutting and pasting that is\n> required. It automatically does the right thing with encodings because\n> I end up sending the message using my MUA.\n\nI had missed the --cover-letter option completely. It may be useful too.\nI'm still trying to find the best way to send pathces. If I send intro\nmessage with real MUA I either need to wait for the message to show up\non a mailing list or check my sent-mail folder to find the Message-Id.\nOnce I know the Message-Id I can send the actual patch series with 'git\nsend-email' as replies to the intro message. Well, this is OK.\n\n> > If portable content encoding detection is difficult or considered\n> > unnecessary, then I think a documented configurable option is fine\n> > (UTF-8 by default).\n>\n> I think that is sensible. Want to try adding it on top of my patches?\n\nI'd like to, but I can only do sh/bash stuff and possibly some\ncopy-and-paste programming with other scripting languages. You'd end up\nfixing my code anyway, sorry.\n\nAs you noticed, I accidentally sent you a couple of test emails because\nsend-email CCed mails to patches' author (I think). Now I have set\n\"suppresscc = all\" and \"suppressfrom = true\" which should prevent such\naccidents. Shouldn't these be defaults? In my opinion it's generally the\nbest practice to always explicitly define what parties emails are sent\nto.\n\nThere is unmatching bracket in your patch:\n\n> diff --git a/git-send-email.perl b/git-send-email.perl\n> index 7c4f06c..3694f81 100755\n> --- a/git-send-email.perl\n> +++ b/git-send-email.perl\n> @@ -536,6 +536,15 @@ EOT\n>  \t\tif (!$in_body && /^MIME-Version:/i) {\n>  \t\t\t$need_8bit_cte = 0;\n>  \t\t}\n> +\t\tif (!$in_body && /^Subject: ?(.*)/i) {\n> +\t\t\tmy $subject = $1;\n> +\t\t\t$_ = \"Subject: \" .\n> +\t\t\t\t($subject =~ /[^[:ascii:]]/ ?\n> +\t\t\t\t quote_rfc2047($subject) :\n> +\t\t\t\t $subject) .\n> +\t\t\t\t\"\\n\";\n> +\t\t\t}\n                        ^-- Shouldn't we remove this one?\n> +\t\t}\n"},{"id":"73128","messageId":"20080326083925.GA31475@coredump.intra.peff.net","threadId":"12861","inReplyTo":"20080326083033.GA13933@mithlond.arda.local","subject":"Re: [PATCH 2/2] send-email: rfc2047-quote subject lines with non-ascii characters","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2008-03-26T08:39:25Z","receivedAt":"2008-03-26T08:39:25Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Wed, Mar 26, 2008 at 10:30:33AM +0200, Teemu Likonen wrote:\n\n> I had missed the --cover-letter option completely. It may be useful too.\n> I'm still trying to find the best way to send pathces. If I send intro\n> message with real MUA I either need to wait for the message to show up\n> on a mailing list or check my sent-mail folder to find the Message-Id.\n> Once I know the Message-Id I can send the actual patch series with 'git\n> send-email' as replies to the intro message. Well, this is OK.\n\nThat is how I used to do it; now I use --cover-letter (which you\nprobably missed because it is brand new in the upcoming 1.5.5).\n\n> > I think that is sensible. Want to try adding it on top of my patches?\n> I'd like to, but I can only do sh/bash stuff and possibly some\n> copy-and-paste programming with other scripting languages. You'd end up\n> fixing my code anyway, sorry.\n\nOK, I will add it to the end of my long todo. Out of curiosity, do you\nactually want something besides utf-8, or is this just to make us feel\nfeature complete?\n\n> As you noticed, I accidentally sent you a couple of test emails because\n> send-email CCed mails to patches' author (I think). Now I have set\n> \"suppresscc = all\" and \"suppressfrom = true\" which should prevent such\n> accidents. Shouldn't these be defaults? In my opinion it's generally the\n> best practice to always explicitly define what parties emails are sent\n> to.\n\nI think this is probably a good change. But it is a behavior change,\nwhich means it is definitely out during the -rc freeze. And it may or\nmay not need a warning period for users.\n\n> There is unmatching bracket in your patch:\n\nArgh, yes. I _thought_ I ran it successfully through the test script,\nbut obviously I failed to 'make' and just tested the previous version.\nIt works fine with the bracket removed.\n\nFor reference, the fixed-up patch is below.\n\n-- >8 --\nsend-email: rfc2047-quote subject lines with non-ascii characters\n\nWe always use 'utf-8' as the encoding, since we currently\nhave no way of getting the information from the user.\n\nThis also refactors the quoting of recipient names, since\nboth processes can share the rfc2047 quoting code.\n\nSigned-off-by: Jeff King <peff@peff.net>\n---\n git-send-email.perl   |   19 +++++++++++++++++--\n t/t9001-send-email.sh |   15 +++++++++++++++\n 2 files changed, 32 insertions(+), 2 deletions(-)\n\ndiff --git a/git-send-email.perl b/git-send-email.perl\nindex 7c4f06c..d0f9d4a 100755\n--- a/git-send-email.perl\n+++ b/git-send-email.perl\n@@ -536,6 +536,14 @@ EOT\n \t\tif (!$in_body && /^MIME-Version:/i) {\n \t\t\t$need_8bit_cte = 0;\n \t\t}\n+\t\tif (!$in_body && /^Subject: ?(.*)/i) {\n+\t\t\tmy $subject = $1;\n+\t\t\t$_ = \"Subject: \" .\n+\t\t\t\t($subject =~ /[^[:ascii:]]/ ?\n+\t\t\t\t quote_rfc2047($subject) :\n+\t\t\t\t $subject) .\n+\t\t\t\t\"\\n\";\n+\t\t}\n \t\tprint C2 $_;\n \t}\n \tclose(C);\n@@ -626,6 +634,14 @@ sub unquote_rfc2047 {\n \treturn wantarray ? ($_, $encoding) : $_;\n }\n \n+sub quote_rfc2047 {\n+\tlocal $_ = shift;\n+\tmy $encoding = shift || 'utf-8';\n+\ts/([^-a-zA-Z0-9!*+\\/])/sprintf(\"=%02X\", ord($1))/eg;\n+\ts/(.*)/=\\?$encoding\\?q\\?$1\\?=/;\n+\treturn $_;\n+}\n+\n # use the simplest quoting being able to handle the recipient\n sub sanitize_address\n {\n@@ -643,8 +659,7 @@ sub sanitize_address\n \n \t# rfc2047 is needed if a non-ascii char is included\n \tif ($recipient_name =~ /[^[:ascii:]]/) {\n-\t\t$recipient_name =~ s/([^-a-zA-Z0-9!*+\\/])/sprintf(\"=%02X\", ord($1))/eg;\n-\t\t$recipient_name =~ s/(.*)/=\\?utf-8\\?q\\?$1\\?=/;\n+\t\t$recipient_name = quote_rfc2047($recipient_name);\n \t}\n \n \t# double quotes are needed if specials or CTLs are included\ndiff --git a/t/t9001-send-email.sh b/t/t9001-send-email.sh\nindex e222c49..a4bcd28 100755\n--- a/t/t9001-send-email.sh\n+++ b/t/t9001-send-email.sh\n@@ -210,4 +210,19 @@ test_expect_success '--compose respects user mime type' '\n \t! grep \"^Content-Type: text/plain; charset=utf-8\" msgtxt1\n '\n \n+test_expect_success '--compose adds MIME for utf8 subject' '\n+\tclean_fake_sendmail &&\n+\techo y | \\\n+\t  GIT_EDITOR=$(pwd)/fake-editor \\\n+\t  GIT_SEND_EMAIL_NOTTY=1 \\\n+\t  git send-email \\\n+\t  --compose --subject utf8-sübjëct \\\n+\t  --from=\"Example <nobody@example.com>\" \\\n+\t  --to=nobody@example.com \\\n+\t  --smtp-server=\"$(pwd)/fake.sendmail\" \\\n+\t  $patches &&\n+\tgrep \"^fake edit\" msgtxt1 &&\n+\tgrep \"^Subject: =?utf-8?q?utf8-s=C3=BCbj=C3=ABct?=\" msgtxt1\n+'\n+\n test_done\n-- \n1.5.5.rc1.133.g360d\n"},{"id":"73129","messageId":"20080326092303.GA17835@mithlond.arda.local","threadId":"12861","inReplyTo":"20080326083925.GA31475@coredump.intra.peff.net","subject":"Re: [PATCH 2/2] send-email: rfc2047-quote subject lines with non-ascii characters","fromName":"Teemu Likonen","fromEmail":"tlikonen@iki.fi","sentAt":"2008-03-26T09:23:03Z","receivedAt":"2008-03-26T09:23:03Z","isPatch":true,"sender":{"key":"tlikonen@iki.fi","avatar":null},"body":"Jeff King kirjoitti (26.3.2008 klo 4.39):\n\n> On Wed, Mar 26, 2008 at 10:30:33AM +0200, Teemu Likonen wrote:\n> \n> > I had missed the --cover-letter option completely. It may be useful\n> > too. I'm still trying to find the best way to send pathces. If\n> > I send intro message with real MUA I either need to wait for the\n> > message to show up on a mailing list or check my sent-mail folder to\n> > find the Message-Id. Once I know the Message-Id I can send the\n> > actual patch series with 'git send-email' as replies to the intro\n> > message. Well, this is OK.\n> \n> That is how I used to do it; now I use --cover-letter (which you\n> probably missed because it is brand new in the upcoming 1.5.5).\n\nI'm using the current 'master' branch so --cover-letter is there.\nManaged to miss it anyway. :)\n\nHmm, do you send the 0000-cover-letter.patch with 'git send-email'? It\nseems that this cover letter don't get MIME headers when sent that way.\nSending through 'mutt -H' it works fine but then the Message-Id needs to\nbe copy-pasted manually to send-mail for the rest of the series (to have\nthem appear as replies, that is). No problem with that.\n\n> OK, I will add it to the end of my long todo. Out of curiosity, do you\n> actually want something besides utf-8, or is this just to make us feel\n> feature complete?\n\nI mostly use (and promote) UTF-8 and now that I begin to understand how\nsend-email works I can live with the current behaviour just fine. Don't\ntake my feedback as complaining. :)\n\nIn general my interests are in human languages and I have done quite\na lot of work in different areas to make computers interact nicely with\nhuman languages. This is my interest in general level and I tend to\nreport/fix problems when I notice them. From Git's point of view at the\npresent moment we can probably say just like you did: \"make us feel\nfeature complete.\"\n\nThanks for your work on this. Really.\n"},{"id":"73130","messageId":"20080326093231.GB17835@mithlond.arda.local","threadId":"12861","inReplyTo":"20080326092303.GA17835@mithlond.arda.local","subject":"Re: [PATCH 2/2] send-email: rfc2047-quote subject lines with non-ascii characters","fromName":"Teemu Likonen","fromEmail":"tlikonen@iki.fi","sentAt":"2008-03-26T09:32:31Z","receivedAt":"2008-03-26T09:32:31Z","isPatch":true,"sender":{"key":"tlikonen@iki.fi","avatar":null},"body":"I mumbled:\n\n> Thanks for your work on this. Really.\n\nMy English is somewhat broken. I meant to thank you for your work.\n"},{"id":"73131","messageId":"20080326093310.GA937@coredump.intra.peff.net","threadId":"12861","inReplyTo":"20080326092303.GA17835@mithlond.arda.local","subject":"Re: [PATCH 2/2] send-email: rfc2047-quote subject lines with non-ascii characters","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2008-03-26T09:33:10Z","receivedAt":"2008-03-26T09:33:10Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Wed, Mar 26, 2008 at 11:23:03AM +0200, Teemu Likonen wrote:\n\n> Hmm, do you send the 0000-cover-letter.patch with 'git send-email'? It\n> seems that this cover letter don't get MIME headers when sent that way.\n> Sending through 'mutt -H' it works fine but then the Message-Id needs to\n> be copy-pasted manually to send-mail for the rest of the series (to have\n> them appear as replies, that is). No problem with that.\n\nNo, I have format-patch do the threading. So something like:\n\n  git format-patch --cover-letter --thread --stdout upstream >mbox\n  mutt -f mbox\n\nand then in mutt I bind a key to <resend-message>. For each message, I\ndo the 'resend', set the recipient headers, look it over one last time,\nand then send. The most annoying part is entering the recipients;\nusually it isn't too bad because I have short aliases for Junio and the\nlist, but I had to, e.g., cut and paste your address twice for the other\nseries.\n\nProbably munging the 'to:' and 'cc:' before running mutt would make the\nmost sense, but I haven't gotten around to it yet.\n\n> I mostly use (and promote) UTF-8 and now that I begin to understand how\n> send-email works I can live with the current behaviour just fine. Don't\n> take my feedback as complaining. :)\n\nOK, I am inclined to leave the patches as-is, then, and wait for\nsomebody to complain about their pet encoding. My reasoning is that:\n\n  - in most cases throughout git, we assume things are happening in\n    utf-8, so I don't think it will come as a great surprise\n  - I think doing it right might be more complex than just send-mail; I\n    am thinking there might need to be a \"stuff the user inputs is in\n    encoding X\" config option. And I don't want to do the work. :)\n\n> Thanks for your work on this. Really.\n\nNo problem at all. Thank you for helping make git better with bug\nreports!\n\n-Peff\n"},{"id":"73132","messageId":"20080326093519.GB937@coredump.intra.peff.net","threadId":"12861","inReplyTo":"20080326093231.GB17835@mithlond.arda.local","subject":"Re: [PATCH 2/2] send-email: rfc2047-quote subject lines with non-ascii characters","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2008-03-26T09:35:19Z","receivedAt":"2008-03-26T09:35:19Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Wed, Mar 26, 2008 at 11:32:31AM +0200, Teemu Likonen wrote:\n\n> I mumbled:\n> \n> > Thanks for your work on this. Really.\n> \n> My English is somewhat broken. I meant to thank you for your work.\n\nMaybe it is the late hour, but I am a native English speaker, and it\nparsed just fine to me.\n\n-Peff\n"},{"id":"73194","messageId":"20080327073808.GA22548@coredump.intra.peff.net","threadId":"12861","inReplyTo":"20080326093310.GA937@coredump.intra.peff.net","subject":"Re: [PATCH 2/2] send-email: rfc2047-quote subject lines with non-ascii characters","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2008-03-27T07:38:08Z","receivedAt":"2008-03-27T07:38:08Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Wed, Mar 26, 2008 at 05:33:10AM -0400, Jeff King wrote:\n\n> No, I have format-patch do the threading. So something like:\n> \n>   git format-patch --cover-letter --thread --stdout upstream >mbox\n>   mutt -f mbox\n> \n> and then in mutt I bind a key to <resend-message>. For each message, I\n\nSince it looks like you are using mutt also, I will warn you that there\nis a problem with this workflow: when mutt does the resend, it generates\na new message-id. Thus the patches are all connected in a thread because\nthey all in-reply-to the cover letter, but the cover letter is not\nconnected, since it has a new message-id.\n\nI'm not sure if there is a way to fix this short of patching mutt. :(\n\n-Peff\n"},{"id":"73216","messageId":"20080327194457.GU18510@inocybe.teonanacatl.org","threadId":"12861","inReplyTo":"20080327073808.GA22548@coredump.intra.peff.net","subject":"Re: [PATCH 2/2] send-email: rfc2047-quote subject lines with non-ascii characters","fromName":"Todd Zullinger","fromEmail":"tmz@pobox.com","sentAt":"2008-03-27T19:44:57Z","receivedAt":"2008-03-27T19:44:57Z","isPatch":true,"sender":{"key":"tmz@pobox.com","avatar":"https://avatars.githubusercontent.com/u/806319?v=4"},"body":"Jeff King wrote:\n> Since it looks like you are using mutt also, I will warn you that\n> there is a problem with this workflow: when mutt does the resend, it\n> generates a new message-id. Thus the patches are all connected in a\n> thread because they all in-reply-to the cover letter, but the cover\n> letter is not connected, since it has a new message-id.\n> \n> I'm not sure if there is a way to fix this short of patching mutt.\n> :(\n\nI don't know if it would help, but perhaps you could try:\n\n:set postponed=/path/to/your/format-patch-mbox\n\ninstead of opening the mbox using -f, and then recall the messages to\nsend.  That *might* prevent mutt from rewriting the message-id, but I\nhaven't tested it at all.\n\n-- \nTodd        OpenPGP -> KeyID: 0xBEAF0CE3 | URL: www.pobox.com/~tmz/pgp\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\nBetween two evils, I always pick the one I never tried before.\n    -- Mae West\n\n"}]}