From: Joe Perches <joe@perches.com>
To: Andrew Morton <akpm@linux-foundation.org>,
Florian Mickler <florian@mickler.org>
Cc: Ryan Mallon <rmallon@gmail.com>, LKML <linux-kernel@vger.kernel.org>
Subject: [PATCH] get_maintainers.pl: Improve .mailmap parsing
Date: Fri, 10 Jun 2011 03:37:23 -0700 [thread overview]
Message-ID: <1307702243.20439.31.camel@Joe-Laptop> (raw)
In-Reply-To: <1307679288.20439.15.camel@Joe-Laptop>
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>
---
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;
--
1.7.5.rc3.dirty
next prev parent reply other threads:[~2011-06-10 10:37 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 ` Joe Perches [this message]
2011-06-10 10:56 ` [PATCH] get_maintainers.pl: Improve .mailmap parsing Florian Mickler
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=1307702243.20439.31.camel@Joe-Laptop \
--to=joe@perches.com \
--cc=akpm@linux-foundation.org \
--cc=florian@mickler.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.