linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* get_maintainer.pl sends bogus addresses to git send-email
@ 2020-04-07 15:40 Olaf Hering
  2020-04-07 17:02 ` Jeff King
  0 siblings, 1 reply; 8+ messages in thread
From: Olaf Hering @ 2020-04-07 15:40 UTC (permalink / raw)
  To: linux-kernel, git

[-- Attachment #1: Type: text/plain, Size: 2800 bytes --]

For me sending patches via git send-email fails because email address
conversion is failing. Something appends a ')' to x86/lkml@kernel.org.
I suspect the double '))' in MAINTAINERS is confusing the command.
I tried to send the trivial patch from v5.0 and v5.6 tag.

Is this a failure in ./scripts/get_maintainer.pl,
or is this something git does internally?
I'm sure others use such command on a daily basis, so likely something on
my end became broken at some point in the past.

Olaf

linux.git $ git send-email --reroll-count 1 --confirm=always --annotate --to-cmd ./scripts/get_maintainer.pl  HEAD^

(mbox) Adding cc: Olaf Hering <olaf@aepfle.de> from line 'From: Olaf Hering <olaf@aepfle.de>'
(body) Adding cc: Olaf Hering <olaf@aepfle.de> from line 'Signed-off-by: Olaf Hering <olaf@aepfle.de>'
(to-cmd) Adding to: "K. Y. Srinivasan" <kys@microsoft.com> from: './scripts/get_maintainer.pl'
(to-cmd) Adding to: Haiyang Zhang <haiyangz@microsoft.com> from: './scripts/get_maintainer.pl'
(to-cmd) Adding to: Stephen Hemminger <sthemmin@microsoft.com> from: './scripts/get_maintainer.pl'
(to-cmd) Adding to: Sasha Levin <sashal@kernel.org> from: './scripts/get_maintainer.pl'
(to-cmd) Adding to: Thomas Gleixner <tglx@linutronix.de> from: './scripts/get_maintainer.pl'
(to-cmd) Adding to: Ingo Molnar <mingo@redhat.com> from: './scripts/get_maintainer.pl'
(to-cmd) Adding to: Borislav Petkov <bp@alien8.de> from: './scripts/get_maintainer.pl'
(to-cmd) Adding to: "H. Peter Anvin" <hpa@zytor.com> from: './scripts/get_maintainer.pl'
(to-cmd) Adding to: x86@kernel.org (maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)) from: './scripts/get_maintainer.pl'
(to-cmd) Adding to: devel@linuxdriverproject.org (open list:Hyper-V CORE AND DRIVERS) from: './scripts/get_maintainer.pl'
(to-cmd) Adding to: linux-kernel@vger.kernel.org (open list:X86 ARCHITECTURE (32-BIT AND 64-BIT)) from: './scripts/get_maintainer.pl'

From: Olaf Hering <olaf@aepfle.de>
To: "K. Y. Srinivasan" <kys@microsoft.com>,
        Haiyang Zhang <haiyangz@microsoft.com>,
        Stephen Hemminger <sthemmin@microsoft.com>,
        Sasha Levin <sashal@kernel.org>,
        Thomas Gleixner <tglx@linutronix.de>,
        Ingo Molnar <mingo@redhat.com>,
        Borislav Petkov <bp@alien8.de>,
        "H. Peter Anvin" <hpa@zytor.com>,
        x86@kernel.org) (maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT),
        devel@linuxdriverproject.org (open list:Hyper-V CORE AND DRIVERS),
        linux-kernel@vger.kernel.org) (open list:X86 ARCHITECTURE (32-BIT AND 64-BIT)
Cc: Olaf Hering <olaf@aepfle.de>
X-Mailer: git-send-email 2.16.4
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit

Send this email? ([y]es|[n]o|[q]uit|[a]ll): y
5.1.3 Invalid character in domain: <x86@kernel.org)>


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: get_maintainer.pl sends bogus addresses to git send-email
  2020-04-07 15:40 get_maintainer.pl sends bogus addresses to git send-email Olaf Hering
@ 2020-04-07 17:02 ` Jeff King
  2020-04-07 17:18   ` Joe Perches
  0 siblings, 1 reply; 8+ messages in thread
From: Jeff King @ 2020-04-07 17:02 UTC (permalink / raw)
  To: Olaf Hering; +Cc: linux-kernel, git

On Tue, Apr 07, 2020 at 05:40:46PM +0200, Olaf Hering wrote:

> For me sending patches via git send-email fails because email address
> conversion is failing. Something appends a ')' to x86/lkml@kernel.org.
> I suspect the double '))' in MAINTAINERS is confusing the command.
> I tried to send the trivial patch from v5.0 and v5.6 tag.
> 
> Is this a failure in ./scripts/get_maintainer.pl,
> or is this something git does internally?
> I'm sure others use such command on a daily basis, so likely something on
> my end became broken at some point in the past.

It's a bug in send-email's hand-rolled address parser, which was fixed
in bd869f67b9 (send-email: add and use a local copy of Mail::Address,
2018-01-05). Upgrade to Git v2.17.0 or newer.

-Peff

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: get_maintainer.pl sends bogus addresses to git send-email
  2020-04-07 17:02 ` Jeff King
@ 2020-04-07 17:18   ` Joe Perches
  2020-04-07 17:29     ` Olaf Hering
  2020-04-07 17:44     ` Jeff King
  0 siblings, 2 replies; 8+ messages in thread
From: Joe Perches @ 2020-04-07 17:18 UTC (permalink / raw)
  To: Jeff King, Olaf Hering; +Cc: linux-kernel, git

On Tue, 2020-04-07 at 13:02 -0400, Jeff King wrote:
> On Tue, Apr 07, 2020 at 05:40:46PM +0200, Olaf Hering wrote:
> 
> > For me sending patches via git send-email fails because email address
> > conversion is failing. Something appends a ')' to x86/lkml@kernel.org.
> > I suspect the double '))' in MAINTAINERS is confusing the command.
> > I tried to send the trivial patch from v5.0 and v5.6 tag.
> > 
> > Is this a failure in ./scripts/get_maintainer.pl,
> > or is this something git does internally?
> > I'm sure others use such command on a daily basis, so likely something on
> > my end became broken at some point in the past.
> 
> It's a bug in send-email's hand-rolled address parser, which was fixed
> in bd869f67b9 (send-email: add and use a local copy of Mail::Address,
> 2018-01-05). Upgrade to Git v2.17.0 or newer.

Not really.
You need to add --norolestats on the get_maintainer command line

git send-email expects bare email addresses, not ones annotated
with additional content.


For instance:

$ ./scripts/get_maintainer.pl -f lib/vsprintf.c
Petr Mladek <pmladek@suse.com> (maintainer:VSPRINTF)
Steven Rostedt <rostedt@goodmis.org> (maintainer:VSPRINTF)
Sergey Senozhatsky <sergey.senozhatsky@gmail.com> (maintainer:VSPRINTF)
Andy Shevchenko <andriy.shevchenko@linux.intel.com> (reviewer:VSPRINTF)
Rasmus Villemoes <linux@rasmusvillemoes.dk> (reviewer:VSPRINTF)
linux-kernel@vger.kernel.org (open list)

vs:

$ ./scripts/get_maintainer.pl -f --norolestats lib/vsprintf.c
Petr Mladek <pmladek@suse.com>
Steven Rostedt <rostedt@goodmis.org>
Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Rasmus Villemoes <linux@rasmusvillemoes.dk>
linux-kernel@vger.kernel.org



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: get_maintainer.pl sends bogus addresses to git send-email
  2020-04-07 17:18   ` Joe Perches
@ 2020-04-07 17:29     ` Olaf Hering
  2020-04-07 17:39       ` Joe Perches
  2020-04-07 17:44     ` Jeff King
  1 sibling, 1 reply; 8+ messages in thread
From: Olaf Hering @ 2020-04-07 17:29 UTC (permalink / raw)
  To: Joe Perches; +Cc: Jeff King, linux-kernel, git

[-- Attachment #1: Type: text/plain, Size: 299 bytes --]

Am Tue, 07 Apr 2020 10:18:41 -0700
schrieb Joe Perches <joe@perches.com>:

> You need to add --norolestats on the get_maintainer command line

Thanks, this can be used as a workaround for the time being.
Not sure why anyone would actually care about such details in default mode...


Olaf

[-- Attachment #2: Digitale Signatur von OpenPGP --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: get_maintainer.pl sends bogus addresses to git send-email
  2020-04-07 17:29     ` Olaf Hering
@ 2020-04-07 17:39       ` Joe Perches
  0 siblings, 0 replies; 8+ messages in thread
From: Joe Perches @ 2020-04-07 17:39 UTC (permalink / raw)
  To: Olaf Hering; +Cc: Jeff King, linux-kernel, git

On Tue, 2020-04-07 at 19:29 +0200, Olaf Hering wrote:
> Am Tue, 07 Apr 2020 10:18:41 -0700
> schrieb Joe Perches <joe@perches.com>:
> 
> > You need to add --norolestats on the get_maintainer command line
> 
> Thanks, this can be used as a workaround for the time being.
> Not sure why anyone would actually care about such details in default mode...

Because the default is
"tell me more about the maintainers of a particular file".
which can include not just the default maintainers of
a particular file within a subsystem, but the also info
about the people that actually apply patches to files.

For instance, a patch made to a file often has a nominal
maintainer that doesn't actually apply the patches but
that maintainer may review or approve but not actually
be the upstream path for acceptance of the patch.




^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: get_maintainer.pl sends bogus addresses to git send-email
  2020-04-07 17:18   ` Joe Perches
  2020-04-07 17:29     ` Olaf Hering
@ 2020-04-07 17:44     ` Jeff King
  2020-04-07 21:56       ` Joe Perches
  1 sibling, 1 reply; 8+ messages in thread
From: Jeff King @ 2020-04-07 17:44 UTC (permalink / raw)
  To: Joe Perches; +Cc: Olaf Hering, linux-kernel, git

On Tue, Apr 07, 2020 at 10:18:41AM -0700, Joe Perches wrote:

> On Tue, 2020-04-07 at 13:02 -0400, Jeff King wrote:
> > On Tue, Apr 07, 2020 at 05:40:46PM +0200, Olaf Hering wrote:
> > 
> > > For me sending patches via git send-email fails because email address
> > > conversion is failing. Something appends a ')' to x86/lkml@kernel.org.
> > > I suspect the double '))' in MAINTAINERS is confusing the command.
> > > I tried to send the trivial patch from v5.0 and v5.6 tag.
> > > 
> > > Is this a failure in ./scripts/get_maintainer.pl,
> > > or is this something git does internally?
> > > I'm sure others use such command on a daily basis, so likely something on
> > > my end became broken at some point in the past.
> > 
> > It's a bug in send-email's hand-rolled address parser, which was fixed
> > in bd869f67b9 (send-email: add and use a local copy of Mail::Address,
> > 2018-01-05). Upgrade to Git v2.17.0 or newer.
> 
> Not really.
> You need to add --norolestats on the get_maintainer command line
> 
> git send-email expects bare email addresses, not ones annotated
> with additional content.

I agree that dropping them from the output is even better, if you'd
never want them to be sent.

Syntactically they are rfc822 comments, and send-email _should_ be able
to handle them (and does in recent versions).

> For instance:
> 
> $ ./scripts/get_maintainer.pl -f lib/vsprintf.c
> Petr Mladek <pmladek@suse.com> (maintainer:VSPRINTF)
> Steven Rostedt <rostedt@goodmis.org> (maintainer:VSPRINTF)
> Sergey Senozhatsky <sergey.senozhatsky@gmail.com> (maintainer:VSPRINTF)
> Andy Shevchenko <andriy.shevchenko@linux.intel.com> (reviewer:VSPRINTF)
> Rasmus Villemoes <linux@rasmusvillemoes.dk> (reviewer:VSPRINTF)

In all of these cases send-email will drop the bit in parentheses.

> linux-kernel@vger.kernel.org (open list)

In this one, I think that the comment will be used as the name field,
since there isn't one.

-Peff

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: get_maintainer.pl sends bogus addresses to git send-email
  2020-04-07 17:44     ` Jeff King
@ 2020-04-07 21:56       ` Joe Perches
  2020-04-08 17:28         ` Jeff King
  0 siblings, 1 reply; 8+ messages in thread
From: Joe Perches @ 2020-04-07 21:56 UTC (permalink / raw)
  To: Jeff King; +Cc: Olaf Hering, linux-kernel, git

On Tue, 2020-04-07 at 13:44 -0400, Jeff King wrote:
> On Tue, Apr 07, 2020 at 10:18:41AM -0700, Joe Perches wrote:
> 
> > On Tue, 2020-04-07 at 13:02 -0400, Jeff King wrote:
> > > On Tue, Apr 07, 2020 at 05:40:46PM +0200, Olaf Hering wrote:
> > > 
> > > > For me sending patches via git send-email fails because email address
> > > > conversion is failing. Something appends a ')' to x86/lkml@kernel.org.
> > > > I suspect the double '))' in MAINTAINERS is confusing the command.
> > > > I tried to send the trivial patch from v5.0 and v5.6 tag.
> > > > 
> > > > Is this a failure in ./scripts/get_maintainer.pl,
> > > > or is this something git does internally?
> > > > I'm sure others use such command on a daily basis, so likely something on
> > > > my end became broken at some point in the past.
> > > 
> > > It's a bug in send-email's hand-rolled address parser, which was fixed
> > > in bd869f67b9 (send-email: add and use a local copy of Mail::Address,
> > > 2018-01-05). Upgrade to Git v2.17.0 or newer.
> > 
> > Not really.
> > You need to add --norolestats on the get_maintainer command line
> > 
> > git send-email expects bare email addresses, not ones annotated
> > with additional content.
> 
> I agree that dropping them from the output is even better, if you'd
> never want them to be sent.
> 
> Syntactically they are rfc822 comments, and send-email _should_ be able
> to handle them (and does in recent versions).

I'm not certain that comments are allowed _after_ a tld in an
email address.  In any case, I guess it's a good thing I used
parentheses for the get_maintainer rolestats block.

> > linux-kernel@vger.kernel.org (open list)
> 
> In this one, I think that the comment will be used as the name field,
> since there isn't one.

I think that slightly unexpected as the name field is not required.

cheers, Joe


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: get_maintainer.pl sends bogus addresses to git send-email
  2020-04-07 21:56       ` Joe Perches
@ 2020-04-08 17:28         ` Jeff King
  0 siblings, 0 replies; 8+ messages in thread
From: Jeff King @ 2020-04-08 17:28 UTC (permalink / raw)
  To: Joe Perches; +Cc: Olaf Hering, linux-kernel, git

On Tue, Apr 07, 2020 at 02:56:19PM -0700, Joe Perches wrote:

> > Syntactically they are rfc822 comments, and send-email _should_ be able
> > to handle them (and does in recent versions).
> 
> I'm not certain that comments are allowed _after_ a tld in an
> email address.  In any case, I guess it's a good thing I used
> parentheses for the get_maintainer rolestats block.

Oh, it's much more horrible than that. RFC822 contains this example:

  Muhammed.(I am  the greatest) Ali @(the)Vegas.WBA

which parses to:

  Muhammed.Ali@Vegas.WBA

Perl's Mail::Address does decipher that correctly.

> > > linux-kernel@vger.kernel.org (open list)
> > 
> > In this one, I think that the comment will be used as the name field,
> > since there isn't one.
> 
> I think that slightly unexpected as the name field is not required.

TBH, so do I. That's all done by Mail::Address's format() method. We
could probably convince it to be less magical, but perhaps it's best to
just leave it alone. Presumably that logic has some historical basis,
and as you note, it's a mistake to be passing these fields into
send-email in the first place.

-Peff

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2020-04-08 17:28 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-07 15:40 get_maintainer.pl sends bogus addresses to git send-email Olaf Hering
2020-04-07 17:02 ` Jeff King
2020-04-07 17:18   ` Joe Perches
2020-04-07 17:29     ` Olaf Hering
2020-04-07 17:39       ` Joe Perches
2020-04-07 17:44     ` Jeff King
2020-04-07 21:56       ` Joe Perches
2020-04-08 17:28         ` Jeff King

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).