{"thread":{"id":"34192","subject":"send-email adds redundant From: lines to message body","startedAt":"2013-06-18T11:09:04Z","lastAt":"2013-06-18T12:50:17Z","messageCount":5,"participants":["SZEDER Gábor","Michael S. Tsirkin"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"221186","messageId":"20130618110904.GA20052@goldbirke","threadId":"34192","inReplyTo":null,"subject":"send-email adds redundant From: lines to message body","fromName":"SZEDER Gábor","fromEmail":"szeder@ira.uka.de","sentAt":"2013-06-18T11:09:04Z","receivedAt":"2013-06-18T11:09:04Z","isPatch":false,"sender":{"key":"szeder.dev@gmail.com","avatar":"https://avatars.githubusercontent.com/u/116324?v=4"},"body":"Hi,\n\n'git send-email' recently started to add redundant From: lines to my\nmessages, see e.g.\n\n  http://article.gmane.org/gmane.comp.version-control.git/228132\n\nBisect points to:\n\ncommit da18759e86bb1a7ee718c79a0c6cb15fbcbdf3c2\nAuthor: Michael S. Tsirkin <mst@redhat.com>\nDate:   2013-06-05 21:11:00 +0300\n\n    send-email: make --suppress-cc=self sanitize input\n    \n    --suppress-cc=self fails to filter sender address in many cases where it\n    needs to be sanitized in some way, for example quoted:\n    \"A U. Thor\" <author@example.com>\n    To fix, make send-email sanitize both sender and the address it is\n    compared against.\n    \n    Signed-off-by: Michael S. Tsirkin <mst@redhat.com>\n    Signed-off-by: Junio C Hamano <gitster@pobox.com>\n\nThe exact commands I run were:\n\n  git format-patch --cover-letter --subject-prefix='PATCH v2' 2847cae835fa70f00e6e2286fbfa5595cb2247d0..bash-prompt-speedup\n  vim 0000-cover-letter.patch\n  git send-email --to=git@vger.kernel.org 00*\n\ni.e. no '--suppress-cc=self' option at all.  Values of related config\nvariables are:\n\n  git config --get-regexp '(sendemail|user)\\..*'\n  sendemail.smtpserver /usr/local/bin/putmail\n  sendemail.confirm auto\n  user.name SZEDER Gábor\n  user.email szeder@ira.uka.de\n\nThe 'á' in my first name is apparently significant: creating a commit\nand sending it as a patch with that accent removed doesn't trigger a\nredundant From: line.\n\n\nThanks,\nGábor\n"},{"id":"221187","messageId":"20130618114207.GD26857@redhat.com","threadId":"34192","inReplyTo":"20130618110904.GA20052@goldbirke","subject":"Re: send-email adds redundant From: lines to message body","fromName":"Michael S. Tsirkin","fromEmail":"mst@redhat.com","sentAt":"2013-06-18T11:42:07Z","receivedAt":"2013-06-18T11:42:07Z","isPatch":false,"sender":{"key":"mst@kernel.org","avatar":null},"body":"On Tue, Jun 18, 2013 at 01:09:04PM +0200, SZEDER Gábor wrote:\n> Hi,\n> \n> 'git send-email' recently started to add redundant From: lines to my\n> messages, see e.g.\n> \n>   http://article.gmane.org/gmane.comp.version-control.git/228132\n\nCan you please show what do commits point to?\nE.g. push to some public tree?\n\n> Bisect points to:\n> \n> commit da18759e86bb1a7ee718c79a0c6cb15fbcbdf3c2\n> Author: Michael S. Tsirkin <mst@redhat.com>\n> Date:   2013-06-05 21:11:00 +0300\n> \n>     send-email: make --suppress-cc=self sanitize input\n>     \n>     --suppress-cc=self fails to filter sender address in many cases where it\n>     needs to be sanitized in some way, for example quoted:\n>     \"A U. Thor\" <author@example.com>\n>     To fix, make send-email sanitize both sender and the address it is\n>     compared against.\n>     \n>     Signed-off-by: Michael S. Tsirkin <mst@redhat.com>\n>     Signed-off-by: Junio C Hamano <gitster@pobox.com>\n> \n> The exact commands I run were:\n> \n>   git format-patch --cover-letter --subject-prefix='PATCH v2' 2847cae835fa70f00e6e2286fbfa5595cb2247d0..bash-prompt-speedup\n>   vim 0000-cover-letter.patch\n>   git send-email --to=git@vger.kernel.org 00*\n> \n> i.e. no '--suppress-cc=self' option at all.  Values of related config\n> variables are:\n> \n>   git config --get-regexp '(sendemail|user)\\..*'\n>   sendemail.smtpserver /usr/local/bin/putmail\n>   sendemail.confirm auto\n>   user.name SZEDER Gábor\n>   user.email szeder@ira.uka.de\n> \n> The 'á' in my first name is apparently significant: creating a commit\n> and sending it as a patch with that accent removed doesn't trigger a\n> redundant From: line.\n> \n> \n> Thanks,\n> Gábor\n"},{"id":"221188","messageId":"20130618114800.GB20052@goldbirke","threadId":"34192","inReplyTo":"20130618114207.GD26857@redhat.com","subject":"Re: send-email adds redundant From: lines to message body","fromName":"SZEDER Gábor","fromEmail":"szeder@ira.uka.de","sentAt":"2013-06-18T11:48:00Z","receivedAt":"2013-06-18T11:48:00Z","isPatch":false,"sender":{"key":"szeder.dev@gmail.com","avatar":"https://avatars.githubusercontent.com/u/116324?v=4"},"body":"On Tue, Jun 18, 2013 at 02:42:07PM +0300, Michael S. Tsirkin wrote:\n> On Tue, Jun 18, 2013 at 01:09:04PM +0200, SZEDER Gábor wrote:\n> > Hi,\n> > \n> > 'git send-email' recently started to add redundant From: lines to my\n> > messages, see e.g.\n> > \n> >   http://article.gmane.org/gmane.comp.version-control.git/228132\n> \n> Can you please show what do commits point to?\n> E.g. push to some public tree?\n\nSure.\n\n  https://github.com/szeder/git.git bash-prompt-speedup\n"},{"id":"221210","messageId":"20130618123653.GE26857@redhat.com","threadId":"34192","inReplyTo":"20130618114800.GB20052@goldbirke","subject":"Re: send-email adds redundant From: lines to message body","fromName":"Michael S. Tsirkin","fromEmail":"mst@redhat.com","sentAt":"2013-06-18T12:36:53Z","receivedAt":"2013-06-18T12:36:53Z","isPatch":false,"sender":{"key":"mst@kernel.org","avatar":null},"body":"On Tue, Jun 18, 2013 at 01:48:00PM +0200, SZEDER Gábor wrote:\n> On Tue, Jun 18, 2013 at 02:42:07PM +0300, Michael S. Tsirkin wrote:\n> > On Tue, Jun 18, 2013 at 01:09:04PM +0200, SZEDER Gábor wrote:\n> > > Hi,\n> > > \n> > > 'git send-email' recently started to add redundant From: lines to my\n> > > messages, see e.g.\n> > > \n> > >   http://article.gmane.org/gmane.comp.version-control.git/228132\n> > \n> > Can you please show what do commits point to?\n> > E.g. push to some public tree?\n> \n> Sure.\n> \n>   https://github.com/szeder/git.git bash-prompt-speedup\n\nI see. The From line looks like this:\n\tFrom: =?UTF-8?q?SZEDER=20G=C3=A1bor?= <szeder@ira.uka.de>\nwhich is why it didn't match.\n\nI added a test like this and sure enough, it fails.\nWill look into a fix now.\n\n--->\nsend-email: add test for duplicate utf8 name\n\nVerify that author name is not duplicated if it matches\nsender, even if it is in utf8.\n\nSigned-off-by: Michael S. Tsirkin <mst@redhat.com>\n\n---\n\ndiff --git a/t/t9001-send-email.sh b/t/t9001-send-email.sh\nindex 9f46f22..cef884f 100755\n--- a/t/t9001-send-email.sh\n+++ b/t/t9001-send-email.sh\n@@ -956,6 +956,19 @@ test_expect_success $PREREQ 'utf8 author is correctly passed on' '\n \tgrep \"^From: Füñný Nâmé <odd_?=mail@example.com>\" msgtxt1\n '\n \n+test_expect_success $PREREQ 'utf8 sender is not duplicated' '\n+\tclean_fake_sendmail &&\n+\ttest_commit weird_sender &&\n+\ttest_when_finished \"git reset --hard HEAD^\" &&\n+\tgit commit --amend --author \"Füñný Nâmé <odd_?=mail@example.com>\" &&\n+\tgit format-patch --stdout -1 >funny_name.patch &&\n+\tgit send-email --from=\"Füñný Nâmé <odd_?=mail@example.com>\" \\\n+\t  --to=nobody@example.com \\\n+\t  --smtp-server=\"$(pwd)/fake.sendmail\" \\\n+\t  funny_name.patch &&\n+\ttest `grep \"^From:\" msgtxt1|wc -l` -eq 1\n+'\n+\n test_expect_success $PREREQ 'sendemail.composeencoding works' '\n \tclean_fake_sendmail &&\n \tgit config sendemail.composeencoding iso-8859-1 &&\n"},{"id":"221214","messageId":"20130618125017.GA28113@redhat.com","threadId":"34192","inReplyTo":"20130618114800.GB20052@goldbirke","subject":"Re: send-email adds redundant From: lines to message body","fromName":"Michael S. Tsirkin","fromEmail":"mst@redhat.com","sentAt":"2013-06-18T12:50:17Z","receivedAt":"2013-06-18T12:50:17Z","isPatch":false,"sender":{"key":"mst@kernel.org","avatar":null},"body":"On Tue, Jun 18, 2013 at 01:48:00PM +0200, SZEDER Gábor wrote:\n> On Tue, Jun 18, 2013 at 02:42:07PM +0300, Michael S. Tsirkin wrote:\n> > On Tue, Jun 18, 2013 at 01:09:04PM +0200, SZEDER Gábor wrote:\n> > > Hi,\n> > > \n> > > 'git send-email' recently started to add redundant From: lines to my\n> > > messages, see e.g.\n> > > \n> > >   http://article.gmane.org/gmane.comp.version-control.git/228132\n> > \n> > Can you please show what do commits point to?\n> > E.g. push to some public tree?\n> \n> Sure.\n> \n>   https://github.com/szeder/git.git bash-prompt-speedup\n\nOkay, missed sanitizing author in one more place.\nI sent a patch that should fix it for you,\ntested-by reports appreciated.\n\n-- \nMST\n"}]}