{"thread":{"id":"38510","subject":"Re: [Qemu-devel] [PATCH v3 0/7] cpu: add device_add foo-x86_64-cpu support","startedAt":"2015-02-05T15:25:39Z","lastAt":"2015-02-18T18:58:12Z","messageCount":7,"participants":["Eric Blake","Junio C Hamano","Jeff King"],"isPatch":true,"patchVersion":3,"patchTotal":7},"messages":[{"id":"255632","messageId":"54D38B73.4060803@redhat.com","threadId":"38510","inReplyTo":"20150205114914.GA10126@stefanha-thinkpad.redhat.com","subject":"Re: [Qemu-devel] [PATCH v3 0/7] cpu: add device_add foo-x86_64-cpu support","fromName":"Eric Blake","fromEmail":"eblake@redhat.com","sentAt":"2015-02-05T15:25:39Z","receivedAt":"2015-02-05T15:25:39Z","isPatch":true,"sender":{"key":"eblake@redhat.com","avatar":"https://avatars.githubusercontent.com/u/32933908?v=4"},"body":"[adding git list to cc]\n\nOn 02/05/2015 04:49 AM, Stefan Hajnoczi wrote:\n> On Wed, Jan 14, 2015 at 03:27:23PM +0800, Zhu Guihua wrote:\n>> This series is based on the previous patchset from Chen Fan:\n>> https://lists.nongnu.org/archive/html/qemu-devel/2014-05/msg02360.html\n> \n> This email has an invalid charset:\n> Content-Type: text/plain; charset=\"y\"\n> \n> I guess you entered \"y\" when asked how the message was encoded.\n> \n> Please don't do that, it means we can only guess at the charset.\n\nIn the past, people made a similar problem when 'git send-email' was\nasking if a message was in-reply-to something else (the number of\nmessages incorrectly threaded to a message-id of 'y' or 'n' was evidence\nof the poor quality of the question).  git.git commit 51bbccfd1b4a\ncorrected that problem.  Sounds like charset encoding is another case\nwhere the interactive parser should be taught to balk at nonsense\nencoding answers?\n\n-- \nEric Blake   eblake redhat com    +1-919-301-3266\nLibvirt virtualization library http://libvirt.org\n\n"},{"id":"255644","messageId":"xmqqiofgkvi4.fsf@gitster.dls.corp.google.com","threadId":"38510","inReplyTo":"54D38B73.4060803@redhat.com","subject":"Re: [Qemu-devel] [PATCH v3 0/7] cpu: add device_add foo-x86_64-cpu support","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2015-02-05T19:29:07Z","receivedAt":"2015-02-05T19:29:07Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Eric Blake <eblake@redhat.com> writes:\n\n> On 02/05/2015 04:49 AM, Stefan Hajnoczi wrote:\n>> On Wed, Jan 14, 2015 at 03:27:23PM +0800, Zhu Guihua wrote:\n>>> This series is based on the previous patchset from Chen Fan:\n>>> https://lists.nongnu.org/archive/html/qemu-devel/2014-05/msg02360.html\n>> \n>> This email has an invalid charset:\n>> Content-Type: text/plain; charset=\"y\"\n>> \n>> I guess you entered \"y\" when asked how the message was encoded.\n>> \n>> Please don't do that, it means we can only guess at the charset.\n>\n> In the past, people made a similar problem when 'git send-email' was\n> asking if a message was in-reply-to something else (the number of\n> messages incorrectly threaded to a message-id of 'y' or 'n' was evidence\n> of the poor quality of the question).  git.git commit 51bbccfd1b4a\n> corrected that problem.  Sounds like charset encoding is another case\n> where the interactive parser should be taught to balk at nonsense\n> encoding answers?\n\nI think I answered this in $gmane/263354; care to come up with a\nplausible valid_re?  It is inpractical to attempt to cover all valid\ncharset names, so whatever you do I'd imagine you would want to pass\nthe confirm_only parameter set to true.\n"},{"id":"255647","messageId":"20150205195758.GC15326@peff.net","threadId":"38510","inReplyTo":"xmqqiofgkvi4.fsf@gitster.dls.corp.google.com","subject":"Re: [Qemu-devel] [PATCH v3 0/7] cpu: add device_add foo-x86_64-cpu support","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2015-02-05T19:57:58Z","receivedAt":"2015-02-05T19:57:58Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Thu, Feb 05, 2015 at 11:29:07AM -0800, Junio C Hamano wrote:\n\n> Eric Blake <eblake@redhat.com> writes:\n> \n> > On 02/05/2015 04:49 AM, Stefan Hajnoczi wrote:\n> >> On Wed, Jan 14, 2015 at 03:27:23PM +0800, Zhu Guihua wrote:\n> >>> This series is based on the previous patchset from Chen Fan:\n> >>> https://lists.nongnu.org/archive/html/qemu-devel/2014-05/msg02360.html\n> >> \n> >> This email has an invalid charset:\n> >> Content-Type: text/plain; charset=\"y\"\n> >> \n> >> I guess you entered \"y\" when asked how the message was encoded.\n> >> \n> >> Please don't do that, it means we can only guess at the charset.\n> >\n> > In the past, people made a similar problem when 'git send-email' was\n> > asking if a message was in-reply-to something else (the number of\n> > messages incorrectly threaded to a message-id of 'y' or 'n' was evidence\n> > of the poor quality of the question).  git.git commit 51bbccfd1b4a\n> > corrected that problem.  Sounds like charset encoding is another case\n> > where the interactive parser should be taught to balk at nonsense\n> > encoding answers?\n> \n> I think I answered this in $gmane/263354; care to come up with a\n> plausible valid_re?  It is inpractical to attempt to cover all valid\n> charset names, so whatever you do I'd imagine you would want to pass\n> the confirm_only parameter set to true.\n\nWould \"length() > 1\" be enough[1]? Or are people really typing \"yes\" and\nnot just \"y\"?\n\nI cannot imagine a charset name that is smaller than two characters. It\nmay be that there are none smaller than 4, and we could cut it off\nthere. Googling around for some lists of common charsets, it seems like\nthat might be plausible (but not any larger; \"big5\" is 4 characters, and\npeople may spell \"utf8\" without the hyphen).\n\n-Peff\n\n[1] Of course, to match the existing regex code, we may want to spell\n    this as \"/../\" or \"/..../\".\n"},{"id":"255651","messageId":"xmqq61bgkt9w.fsf@gitster.dls.corp.google.com","threadId":"38510","inReplyTo":"20150205195758.GC15326@peff.net","subject":"Re: [Qemu-devel] [PATCH v3 0/7] cpu: add device_add foo-x86_64-cpu support","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2015-02-05T20:17:15Z","receivedAt":"2015-02-05T20:17:15Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jeff King <peff@peff.net> writes:\n\n> On Thu, Feb 05, 2015 at 11:29:07AM -0800, Junio C Hamano wrote:\n>\n>> Eric Blake <eblake@redhat.com> writes:\n>> \n>> > On 02/05/2015 04:49 AM, Stefan Hajnoczi wrote:\n>> >> On Wed, Jan 14, 2015 at 03:27:23PM +0800, Zhu Guihua wrote:\n>> >>> This series is based on the previous patchset from Chen Fan:\n>> >>> https://lists.nongnu.org/archive/html/qemu-devel/2014-05/msg02360.html\n>> >> \n>> >> This email has an invalid charset:\n>> >> Content-Type: text/plain; charset=\"y\"\n>> >> \n>> >> I guess you entered \"y\" when asked how the message was encoded.\n>> >> \n>> >> Please don't do that, it means we can only guess at the charset.\n>> >\n>> > In the past, people made a similar problem when 'git send-email' was\n>> > asking if a message was in-reply-to something else (the number of\n>> > messages incorrectly threaded to a message-id of 'y' or 'n' was evidence\n>> > of the poor quality of the question).  git.git commit 51bbccfd1b4a\n>> > corrected that problem.  Sounds like charset encoding is another case\n>> > where the interactive parser should be taught to balk at nonsense\n>> > encoding answers?\n>> \n>> I think I answered this in $gmane/263354; care to come up with a\n>> plausible valid_re?  It is inpractical to attempt to cover all valid\n>> charset names, so whatever you do I'd imagine you would want to pass\n>> the confirm_only parameter set to true.\n>\n> Would \"length() > 1\" be enough[1]? Or are people really typing \"yes\" and\n> not just \"y\"?\n>\n> I cannot imagine a charset name that is smaller than two characters. It\n> may be that there are none smaller than 4, and we could cut it off\n> there. Googling around for some lists of common charsets, it seems like\n> that might be plausible (but not any larger; \"big5\" is 4 characters, and\n> people may spell \"utf8\" without the hyphen).\n>\n> -Peff\n>\n> [1] Of course, to match the existing regex code, we may want to spell\n>     this as \"/../\" or \"/..../\".\n\nPerhaps. Just in case there were shorter ones, something like this\nwith confirm_only to allow them to say \"Yes, I do mean 'xx'\"?\n\n git-send-email.perl | 1 +\n 1 file changed, 1 insertion(+)\n\ndiff --git a/git-send-email.perl b/git-send-email.perl\nindex 3092ab3..848f176 100755\n--- a/git-send-email.perl\n+++ b/git-send-email.perl\n@@ -752,6 +752,7 @@ sub file_declares_8bit_cte {\n \t\tprint \"    $f\\n\";\n \t}\n \t$auto_8bit_encoding = ask(\"Which 8bit encoding should I declare [UTF-8]? \",\n+\t\t\t\t  valid_re => qr/.{4}/, confirm_only => 1,\n \t\t\t\t  default => \"UTF-8\");\n }\n \n"},{"id":"255672","messageId":"20150206193349.GB4220@peff.net","threadId":"38510","inReplyTo":"xmqq61bgkt9w.fsf@gitster.dls.corp.google.com","subject":"Re: [Qemu-devel] [PATCH v3 0/7] cpu: add device_add foo-x86_64-cpu support","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2015-02-06T19:33:49Z","receivedAt":"2015-02-06T19:33:49Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Thu, Feb 05, 2015 at 12:17:15PM -0800, Junio C Hamano wrote:\n\n> > Would \"length() > 1\" be enough[1]? Or are people really typing \"yes\" and\n> > not just \"y\"?\n> >\n> > I cannot imagine a charset name that is smaller than two characters. It\n> > may be that there are none smaller than 4, and we could cut it off\n> > there. Googling around for some lists of common charsets, it seems like\n> > that might be plausible (but not any larger; \"big5\" is 4 characters, and\n> > people may spell \"utf8\" without the hyphen).\n> >\n> > -Peff\n> >\n> > [1] Of course, to match the existing regex code, we may want to spell\n> >     this as \"/../\" or \"/..../\".\n> \n> Perhaps. Just in case there were shorter ones, something like this\n> with confirm_only to allow them to say \"Yes, I do mean 'xx'\"?\n> \n>  git-send-email.perl | 1 +\n>  1 file changed, 1 insertion(+)\n> \n> diff --git a/git-send-email.perl b/git-send-email.perl\n> index 3092ab3..848f176 100755\n> --- a/git-send-email.perl\n> +++ b/git-send-email.perl\n> @@ -752,6 +752,7 @@ sub file_declares_8bit_cte {\n>  \t\tprint \"    $f\\n\";\n>  \t}\n>  \t$auto_8bit_encoding = ask(\"Which 8bit encoding should I declare [UTF-8]? \",\n> +\t\t\t\t  valid_re => qr/.{4}/, confirm_only => 1,\n>  \t\t\t\t  default => \"UTF-8\");\n>  }\n\nYes, I think leaving an escape hatch is a good idea, just in case.\n\n-Peff\n"},{"id":"256171","messageId":"xmqqiof14hax.fsf_-_@gitster.dls.corp.google.com","threadId":"38510","inReplyTo":"20150206193349.GB4220@peff.net","subject":"[PATCH] send-email: ask confirmation if given encoding name is very short","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2015-02-16T22:34:14Z","receivedAt":"2015-02-16T22:34:14Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Sometimes people respond \"y<ENTER>\" (or \"yes<ENTER>\") when asked\nthis question:\n\n    Which 8bit encoding should I declare [UTF-8]?\n\nWe already have a mechanism to avoid accepting a mistyped e-mail\naddress (we ask to confirm when the given address lacks \"@\" in it);\nreuse it to trigger the same confirmation when given a very short\nanswer.  As a typical charset name is probably at least 4 chars or\nlonger (e.g. \"UTF8\" spelled without the dash, or \"Big5\"), this would\nprevent such a mistake.\n\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n\n * Will mark to be merged to 'next'.\n\n git-send-email.perl | 1 +\n 1 file changed, 1 insertion(+)\n\ndiff --git a/git-send-email.perl b/git-send-email.perl\nindex fdb0029..eb32371 100755\n--- a/git-send-email.perl\n+++ b/git-send-email.perl\n@@ -733,6 +733,7 @@ sub file_declares_8bit_cte {\n \t\tprint \"    $f\\n\";\n \t}\n \t$auto_8bit_encoding = ask(\"Which 8bit encoding should I declare [UTF-8]? \",\n+\t\t\t\t  valid_re => qr/.{4}/, confirm_only => 1,\n \t\t\t\t  default => \"UTF-8\");\n }\n \n-- \n2.3.0-282-gf18c841\n"},{"id":"256294","messageId":"20150218185812.GC7257@peff.net","threadId":"38510","inReplyTo":"xmqqiof14hax.fsf_-_@gitster.dls.corp.google.com","subject":"Re: [PATCH] send-email: ask confirmation if given encoding name is very short","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2015-02-18T18:58:12Z","receivedAt":"2015-02-18T18:58:12Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Mon, Feb 16, 2015 at 02:34:14PM -0800, Junio C Hamano wrote:\n\n> Sometimes people respond \"y<ENTER>\" (or \"yes<ENTER>\") when asked\n> this question:\n> \n>     Which 8bit encoding should I declare [UTF-8]?\n> \n> We already have a mechanism to avoid accepting a mistyped e-mail\n> address (we ask to confirm when the given address lacks \"@\" in it);\n> reuse it to trigger the same confirmation when given a very short\n> answer.  As a typical charset name is probably at least 4 chars or\n> longer (e.g. \"UTF8\" spelled without the dash, or \"Big5\"), this would\n> prevent such a mistake.\n> \n> Signed-off-by: Junio C Hamano <gitster@pobox.com>\n> ---\n> \n>  * Will mark to be merged to 'next'.\n\nProbably belated review, but this looks good to me.\n\n-Peff\n"}]}