Re: [PATCH] checkpatch: Remove email address comment from email address comparisons

From: Joe Perches
Date: Mon Feb 10 2020 - 18:09:40 EST


On Mon, 2020-02-10 at 14:25 -0800, Andrew Morton wrote:
> On Mon, 10 Feb 2020 10:52:16 -0800 Joe Perches <joe@xxxxxxxxxxx> wrote:
>
> > About 2% of the last 100K commits have email addresses that include an
> > RFC2822 compliant comment like:
> >
> > Peter Zijlstra (Intel) <peterz@xxxxxxxxxxxxx>
> >
> > checkpatch currently does a comparison of the complete name and address
> > to the submitted author to determine if the author has signed-off and
> > emits a warning if the exact email names and addresses do not match.
>
> Yes, I've seen this a few times.
>
> > Unfortunately, the author email address can be written without the comment
> > like:
> >
> > Peter Zijlstra <peterz@xxxxxxxxxxxxx>
> >
> > Add logic to compare the comment stripped email addresses to avoid this
> > warning.
>
> Where "stripped" means "after removing stuff in parentheses"?

Basically, yes.

> Why do we consider the display name at all? It's the
> "peterz@xxxxxxxxxxxxx" part which matters for comparison purposes?

True, but if people are going to author a patch with
one name and sign it with a different one, then some
warning should probably be emitted.

btw:

This code is case sensitive and probably should not be.

I'll probably send a new patch, but the generic use of
'fc' is not supported for older perl versions and so it'll
likely use 'lc' instead.