public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Florian Mickler <florian@mickler.org>
To: Joe Perches <joe@perches.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Ryan Mallon <rmallon@gmail.com>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] get_maintainers.pl: Improve .mailmap parsing
Date: Fri, 10 Jun 2011 12:56:18 +0200	[thread overview]
Message-ID: <20110610125618.311d8c27@schatten.dmk.lab> (raw)
In-Reply-To: <1307702243.20439.31.camel@Joe-Laptop>

On Fri, 10 Jun 2011 03:37:23 -0700
Joe Perches <joe@perches.com> wrote:

> Entries that used formats other than "Proper Name <commit@email.xx>"
> were not parsed properly.
> 
> Try to improve the parsing so that the entries in the forms of:
>     Proper Name <proper@email.xx> <commit@email.xx>
> and
>     Proper Name <proper@email.xx> Commit Name <commit@email.xx>
> are transformed correctly.
> 
> Signed-off-by: Joe Perches <joe@perches.com> 


Yup. Looks good. 

Reviewed-By: Florian Mickler <florian@mickler.org>

> ---
>  scripts/get_maintainer.pl |    9 +++++----
>  1 files changed, 5 insertions(+), 4 deletions(-)
> 
> diff --git a/scripts/get_maintainer.pl b/scripts/get_maintainer.pl
> index d29a8d7..eb2f1e6 100755
> --- a/scripts/get_maintainer.pl
> +++ b/scripts/get_maintainer.pl
> @@ -328,7 +328,8 @@ sub read_mailmap {
>  	# name1 <mail1> <mail2>
>  	# name1 <mail1> name2 <mail2>
>  	# (see man git-shortlog)
> -	if (/^(.+)<(.+)>$/) {
> +
> +	if (/^([^<]+)<([^>]+)>$/) {
>  	    my $real_name = $1;
>  	    my $address = $2;
>  
> @@ -336,13 +337,13 @@ sub read_mailmap {
>  	    ($real_name, $address) = parse_email("$real_name <$address>");
>  	    $mailmap->{names}->{$address} = $real_name;
>  
> -	} elsif (/^<([^\s]+)>\s*<([^\s]+)>$/) {
> +	} elsif (/^<([^>]+)>\s*<([^>]+)>$/) {
>  	    my $real_address = $1;
>  	    my $wrong_address = $2;
>  
>  	    $mailmap->{addresses}->{$wrong_address} = $real_address;
>  
> -	} elsif (/^(.+)<([^\s]+)>\s*<([^\s]+)>$/) {
> +	} elsif (/^(.+)<([^>]+)>\s*<([^>]+)>$/) {
>  	    my $real_name = $1;
>  	    my $real_address = $2;
>  	    my $wrong_address = $3;
> @@ -353,7 +354,7 @@ sub read_mailmap {
>  	    $mailmap->{names}->{$wrong_address} = $real_name;
>  	    $mailmap->{addresses}->{$wrong_address} = $real_address;
>  
> -	} elsif (/^(.+)<([^\s]+)>\s*([^\s].*)<([^\s]+)>$/) {
> +	} elsif (/^(.+)<([^>]+)>\s*(.+)\s*<([^>]+)>$/) {
>  	    my $real_name = $1;
>  	    my $real_address = $2;
>  	    my $wrong_name = $3;

  reply	other threads:[~2011-06-10 10:56 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-09 23:12 [PATCH trival/tree-wide] Change Ryan Mallon's email address across the kernel Ryan Mallon
2011-06-10  0:28 ` H Hartley Sweeten
2011-06-10  0:50   ` Ryan Mallon
2011-06-10  2:55 ` Paul Mundt
2011-06-10  3:05   ` Ryan Mallon
2011-06-10  3:11     ` Joe Perches
2011-06-10  3:13       ` Ryan Mallon
2011-06-10  3:24         ` Joe Perches
2011-06-10  3:31           ` Ryan Mallon
2011-06-10  3:51             ` Paul Mundt
2011-06-10  3:54               ` Ryan Mallon
2011-06-10  4:14                 ` Joe Perches
2011-06-10 10:37                   ` [PATCH] get_maintainers.pl: Improve .mailmap parsing Joe Perches
2011-06-10 10:56                     ` Florian Mickler [this message]
2011-06-10  9:33             ` [PATCH trival/tree-wide] Change Ryan Mallon's email address across the kernel Jesper Juhl
2011-06-10  8:56   ` Alan Cox
2011-06-13 23:05     ` Ryan Mallon
2011-06-13 23:15       ` Joe Perches

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110610125618.311d8c27@schatten.dmk.lab \
    --to=florian@mickler.org \
    --cc=akpm@linux-foundation.org \
    --cc=joe@perches.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rmallon@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox