{"thread":{"id":"53177","subject":"get_maintainer.pl sends bogus addresses to git send-email","startedAt":"2020-04-07T15:53:04Z","lastAt":"2020-04-08T17:28:59Z","messageCount":8,"participants":["Olaf Hering","Jeff King","Joe Perches"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"394969","messageId":"20200407154046.GA15368@aepfle.de","threadId":"53177","inReplyTo":null,"subject":"get_maintainer.pl sends bogus addresses to git send-email","fromName":"Olaf Hering","fromEmail":"olaf@aepfle.de","sentAt":"2020-04-07T15:40:46Z","receivedAt":"2020-04-07T15:53:04Z","isPatch":false,"sender":{"key":"olaf@aepfle.de","avatar":"https://avatars.githubusercontent.com/u/942324?v=4"},"body":"For me sending patches via git send-email fails because email address\nconversion is failing. Something appends a ')' to x86/lkml@kernel.org.\nI suspect the double '))' in MAINTAINERS is confusing the command.\nI tried to send the trivial patch from v5.0 and v5.6 tag.\n\nIs this a failure in ./scripts/get_maintainer.pl,\nor is this something git does internally?\nI'm sure others use such command on a daily basis, so likely something on\nmy end became broken at some point in the past.\n\nOlaf\n\nlinux.git $ git send-email --reroll-count 1 --confirm=always --annotate --to-cmd ./scripts/get_maintainer.pl  HEAD^\n\n(mbox) Adding cc: Olaf Hering <olaf@aepfle.de> from line 'From: Olaf Hering <olaf@aepfle.de>'\n(body) Adding cc: Olaf Hering <olaf@aepfle.de> from line 'Signed-off-by: Olaf Hering <olaf@aepfle.de>'\n(to-cmd) Adding to: \"K. Y. Srinivasan\" <kys@microsoft.com> from: './scripts/get_maintainer.pl'\n(to-cmd) Adding to: Haiyang Zhang <haiyangz@microsoft.com> from: './scripts/get_maintainer.pl'\n(to-cmd) Adding to: Stephen Hemminger <sthemmin@microsoft.com> from: './scripts/get_maintainer.pl'\n(to-cmd) Adding to: Sasha Levin <sashal@kernel.org> from: './scripts/get_maintainer.pl'\n(to-cmd) Adding to: Thomas Gleixner <tglx@linutronix.de> from: './scripts/get_maintainer.pl'\n(to-cmd) Adding to: Ingo Molnar <mingo@redhat.com> from: './scripts/get_maintainer.pl'\n(to-cmd) Adding to: Borislav Petkov <bp@alien8.de> from: './scripts/get_maintainer.pl'\n(to-cmd) Adding to: \"H. Peter Anvin\" <hpa@zytor.com> from: './scripts/get_maintainer.pl'\n(to-cmd) Adding to: x86@kernel.org (maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)) from: './scripts/get_maintainer.pl'\n(to-cmd) Adding to: devel@linuxdriverproject.org (open list:Hyper-V CORE AND DRIVERS) from: './scripts/get_maintainer.pl'\n(to-cmd) Adding to: linux-kernel@vger.kernel.org (open list:X86 ARCHITECTURE (32-BIT AND 64-BIT)) from: './scripts/get_maintainer.pl'\n\nFrom: Olaf Hering <olaf@aepfle.de>\nTo: \"K. Y. Srinivasan\" <kys@microsoft.com>,\n        Haiyang Zhang <haiyangz@microsoft.com>,\n        Stephen Hemminger <sthemmin@microsoft.com>,\n        Sasha Levin <sashal@kernel.org>,\n        Thomas Gleixner <tglx@linutronix.de>,\n        Ingo Molnar <mingo@redhat.com>,\n        Borislav Petkov <bp@alien8.de>,\n        \"H. Peter Anvin\" <hpa@zytor.com>,\n        x86@kernel.org) (maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT),\n        devel@linuxdriverproject.org (open list:Hyper-V CORE AND DRIVERS),\n        linux-kernel@vger.kernel.org) (open list:X86 ARCHITECTURE (32-BIT AND 64-BIT)\nCc: Olaf Hering <olaf@aepfle.de>\nX-Mailer: git-send-email 2.16.4\nMIME-Version: 1.0\nContent-Transfer-Encoding: 8bit\n\nSend this email? ([y]es|[n]o|[q]uit|[a]ll): y\n5.1.3 Invalid character in domain: <x86@kernel.org)>\n\n"},{"id":"394977","messageId":"20200407170257.GA1844923@coredump.intra.peff.net","threadId":"53177","inReplyTo":"20200407154046.GA15368@aepfle.de","subject":"Re: get_maintainer.pl sends bogus addresses to git send-email","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2020-04-07T17:02:57Z","receivedAt":"2020-04-07T17:03:01Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Tue, Apr 07, 2020 at 05:40:46PM +0200, Olaf Hering wrote:\n\n> For me sending patches via git send-email fails because email address\n> conversion is failing. Something appends a ')' to x86/lkml@kernel.org.\n> I suspect the double '))' in MAINTAINERS is confusing the command.\n> I tried to send the trivial patch from v5.0 and v5.6 tag.\n> \n> Is this a failure in ./scripts/get_maintainer.pl,\n> or is this something git does internally?\n> I'm sure others use such command on a daily basis, so likely something on\n> my end became broken at some point in the past.\n\nIt's a bug in send-email's hand-rolled address parser, which was fixed\nin bd869f67b9 (send-email: add and use a local copy of Mail::Address,\n2018-01-05). Upgrade to Git v2.17.0 or newer.\n\n-Peff\n"},{"id":"394979","messageId":"2e6975d606846c834a387c07ee11cdce52356586.camel@perches.com","threadId":"53177","inReplyTo":"20200407170257.GA1844923@coredump.intra.peff.net","subject":"Re: get_maintainer.pl sends bogus addresses to git send-email","fromName":"Joe Perches","fromEmail":"joe@perches.com","sentAt":"2020-04-07T17:18:41Z","receivedAt":"2020-04-07T17:29:44Z","isPatch":false,"sender":{"key":"joe@perches.com","avatar":"https://avatars.githubusercontent.com/u/13122723?v=4"},"body":"On Tue, 2020-04-07 at 13:02 -0400, Jeff King wrote:\n> On Tue, Apr 07, 2020 at 05:40:46PM +0200, Olaf Hering wrote:\n> \n> > For me sending patches via git send-email fails because email address\n> > conversion is failing. Something appends a ')' to x86/lkml@kernel.org.\n> > I suspect the double '))' in MAINTAINERS is confusing the command.\n> > I tried to send the trivial patch from v5.0 and v5.6 tag.\n> > \n> > Is this a failure in ./scripts/get_maintainer.pl,\n> > or is this something git does internally?\n> > I'm sure others use such command on a daily basis, so likely something on\n> > my end became broken at some point in the past.\n> \n> It's a bug in send-email's hand-rolled address parser, which was fixed\n> in bd869f67b9 (send-email: add and use a local copy of Mail::Address,\n> 2018-01-05). Upgrade to Git v2.17.0 or newer.\n\nNot really.\nYou need to add --norolestats on the get_maintainer command line\n\ngit send-email expects bare email addresses, not ones annotated\nwith additional content.\n\n\nFor instance:\n\n$ ./scripts/get_maintainer.pl -f lib/vsprintf.c\nPetr Mladek <pmladek@suse.com> (maintainer:VSPRINTF)\nSteven Rostedt <rostedt@goodmis.org> (maintainer:VSPRINTF)\nSergey Senozhatsky <sergey.senozhatsky@gmail.com> (maintainer:VSPRINTF)\nAndy Shevchenko <andriy.shevchenko@linux.intel.com> (reviewer:VSPRINTF)\nRasmus Villemoes <linux@rasmusvillemoes.dk> (reviewer:VSPRINTF)\nlinux-kernel@vger.kernel.org (open list)\n\nvs:\n\n$ ./scripts/get_maintainer.pl -f --norolestats lib/vsprintf.c\nPetr Mladek <pmladek@suse.com>\nSteven Rostedt <rostedt@goodmis.org>\nSergey Senozhatsky <sergey.senozhatsky@gmail.com>\nAndy Shevchenko <andriy.shevchenko@linux.intel.com>\nRasmus Villemoes <linux@rasmusvillemoes.dk>\nlinux-kernel@vger.kernel.org\n\n\n"},{"id":"394980","messageId":"20200407192949.586159e7.olaf@aepfle.de","threadId":"53177","inReplyTo":"2e6975d606846c834a387c07ee11cdce52356586.camel@perches.com","subject":"Re: get_maintainer.pl sends bogus addresses to git send-email","fromName":"Olaf Hering","fromEmail":"olaf@aepfle.de","sentAt":"2020-04-07T17:29:49Z","receivedAt":"2020-04-07T17:30:02Z","isPatch":false,"sender":{"key":"olaf@aepfle.de","avatar":"https://avatars.githubusercontent.com/u/942324?v=4"},"body":"Am Tue, 07 Apr 2020 10:18:41 -0700\nschrieb Joe Perches <joe@perches.com>:\n\n> You need to add --norolestats on the get_maintainer command line\n\nThanks, this can be used as a workaround for the time being.\nNot sure why anyone would actually care about such details in default mode...\n\n\nOlaf\n"},{"id":"394981","messageId":"5d05fca7bcdeb57ed31fbbfc66d4cf7224e56f92.camel@perches.com","threadId":"53177","inReplyTo":"20200407192949.586159e7.olaf@aepfle.de","subject":"Re: get_maintainer.pl sends bogus addresses to git send-email","fromName":"Joe Perches","fromEmail":"joe@perches.com","sentAt":"2020-04-07T17:39:58Z","receivedAt":"2020-04-07T17:42:02Z","isPatch":false,"sender":{"key":"joe@perches.com","avatar":"https://avatars.githubusercontent.com/u/13122723?v=4"},"body":"On Tue, 2020-04-07 at 19:29 +0200, Olaf Hering wrote:\n> Am Tue, 07 Apr 2020 10:18:41 -0700\n> schrieb Joe Perches <joe@perches.com>:\n> \n> > You need to add --norolestats on the get_maintainer command line\n> \n> Thanks, this can be used as a workaround for the time being.\n> Not sure why anyone would actually care about such details in default mode...\n\nBecause the default is\n\"tell me more about the maintainers of a particular file\".\nwhich can include not just the default maintainers of\na particular file within a subsystem, but the also info\nabout the people that actually apply patches to files.\n\nFor instance, a patch made to a file often has a nominal\nmaintainer that doesn't actually apply the patches but\nthat maintainer may review or approve but not actually\nbe the upstream path for acceptance of the patch.\n\n\n\n"},{"id":"394982","messageId":"20200407174449.GA1884106@coredump.intra.peff.net","threadId":"53177","inReplyTo":"2e6975d606846c834a387c07ee11cdce52356586.camel@perches.com","subject":"Re: get_maintainer.pl sends bogus addresses to git send-email","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2020-04-07T17:44:49Z","receivedAt":"2020-04-07T17:44:56Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Tue, Apr 07, 2020 at 10:18:41AM -0700, Joe Perches wrote:\n\n> On Tue, 2020-04-07 at 13:02 -0400, Jeff King wrote:\n> > On Tue, Apr 07, 2020 at 05:40:46PM +0200, Olaf Hering wrote:\n> > \n> > > For me sending patches via git send-email fails because email address\n> > > conversion is failing. Something appends a ')' to x86/lkml@kernel.org.\n> > > I suspect the double '))' in MAINTAINERS is confusing the command.\n> > > I tried to send the trivial patch from v5.0 and v5.6 tag.\n> > > \n> > > Is this a failure in ./scripts/get_maintainer.pl,\n> > > or is this something git does internally?\n> > > I'm sure others use such command on a daily basis, so likely something on\n> > > my end became broken at some point in the past.\n> > \n> > It's a bug in send-email's hand-rolled address parser, which was fixed\n> > in bd869f67b9 (send-email: add and use a local copy of Mail::Address,\n> > 2018-01-05). Upgrade to Git v2.17.0 or newer.\n> \n> Not really.\n> You need to add --norolestats on the get_maintainer command line\n> \n> git send-email expects bare email addresses, not ones annotated\n> with additional content.\n\nI agree that dropping them from the output is even better, if you'd\nnever want them to be sent.\n\nSyntactically they are rfc822 comments, and send-email _should_ be able\nto handle them (and does in recent versions).\n\n> For instance:\n> \n> $ ./scripts/get_maintainer.pl -f lib/vsprintf.c\n> Petr Mladek <pmladek@suse.com> (maintainer:VSPRINTF)\n> Steven Rostedt <rostedt@goodmis.org> (maintainer:VSPRINTF)\n> Sergey Senozhatsky <sergey.senozhatsky@gmail.com> (maintainer:VSPRINTF)\n> Andy Shevchenko <andriy.shevchenko@linux.intel.com> (reviewer:VSPRINTF)\n> Rasmus Villemoes <linux@rasmusvillemoes.dk> (reviewer:VSPRINTF)\n\nIn all of these cases send-email will drop the bit in parentheses.\n\n> linux-kernel@vger.kernel.org (open list)\n\nIn this one, I think that the comment will be used as the name field,\nsince there isn't one.\n\n-Peff\n"},{"id":"395012","messageId":"2afc201cea5fd59829ce818041b4290a0ec5bb8c.camel@perches.com","threadId":"53177","inReplyTo":"20200407174449.GA1884106@coredump.intra.peff.net","subject":"Re: get_maintainer.pl sends bogus addresses to git send-email","fromName":"Joe Perches","fromEmail":"joe@perches.com","sentAt":"2020-04-07T21:56:19Z","receivedAt":"2020-04-07T21:58:24Z","isPatch":false,"sender":{"key":"joe@perches.com","avatar":"https://avatars.githubusercontent.com/u/13122723?v=4"},"body":"On Tue, 2020-04-07 at 13:44 -0400, Jeff King wrote:\n> On Tue, Apr 07, 2020 at 10:18:41AM -0700, Joe Perches wrote:\n> \n> > On Tue, 2020-04-07 at 13:02 -0400, Jeff King wrote:\n> > > On Tue, Apr 07, 2020 at 05:40:46PM +0200, Olaf Hering wrote:\n> > > \n> > > > For me sending patches via git send-email fails because email address\n> > > > conversion is failing. Something appends a ')' to x86/lkml@kernel.org.\n> > > > I suspect the double '))' in MAINTAINERS is confusing the command.\n> > > > I tried to send the trivial patch from v5.0 and v5.6 tag.\n> > > > \n> > > > Is this a failure in ./scripts/get_maintainer.pl,\n> > > > or is this something git does internally?\n> > > > I'm sure others use such command on a daily basis, so likely something on\n> > > > my end became broken at some point in the past.\n> > > \n> > > It's a bug in send-email's hand-rolled address parser, which was fixed\n> > > in bd869f67b9 (send-email: add and use a local copy of Mail::Address,\n> > > 2018-01-05). Upgrade to Git v2.17.0 or newer.\n> > \n> > Not really.\n> > You need to add --norolestats on the get_maintainer command line\n> > \n> > git send-email expects bare email addresses, not ones annotated\n> > with additional content.\n> \n> I agree that dropping them from the output is even better, if you'd\n> never want them to be sent.\n> \n> Syntactically they are rfc822 comments, and send-email _should_ be able\n> to handle them (and does in recent versions).\n\nI'm not certain that comments are allowed _after_ a tld in an\nemail address.  In any case, I guess it's a good thing I used\nparentheses for the get_maintainer rolestats block.\n\n> > linux-kernel@vger.kernel.org (open list)\n> \n> In this one, I think that the comment will be used as the name field,\n> since there isn't one.\n\nI think that slightly unexpected as the name field is not required.\n\ncheers, Joe\n\n"},{"id":"395074","messageId":"20200408172853.GA1961925@coredump.intra.peff.net","threadId":"53177","inReplyTo":"2afc201cea5fd59829ce818041b4290a0ec5bb8c.camel@perches.com","subject":"Re: get_maintainer.pl sends bogus addresses to git send-email","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2020-04-08T17:28:53Z","receivedAt":"2020-04-08T17:28:59Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Tue, Apr 07, 2020 at 02:56:19PM -0700, Joe Perches wrote:\n\n> > Syntactically they are rfc822 comments, and send-email _should_ be able\n> > to handle them (and does in recent versions).\n> \n> I'm not certain that comments are allowed _after_ a tld in an\n> email address.  In any case, I guess it's a good thing I used\n> parentheses for the get_maintainer rolestats block.\n\nOh, it's much more horrible than that. RFC822 contains this example:\n\n  Muhammed.(I am  the greatest) Ali @(the)Vegas.WBA\n\nwhich parses to:\n\n  Muhammed.Ali@Vegas.WBA\n\nPerl's Mail::Address does decipher that correctly.\n\n> > > linux-kernel@vger.kernel.org (open list)\n> > \n> > In this one, I think that the comment will be used as the name field,\n> > since there isn't one.\n> \n> I think that slightly unexpected as the name field is not required.\n\nTBH, so do I. That's all done by Mail::Address's format() method. We\ncould probably convince it to be less magical, but perhaps it's best to\njust leave it alone. Presumably that logic has some historical basis,\nand as you note, it's a mistake to be passing these fields into\nsend-email in the first place.\n\n-Peff\n"}]}