The patch titled scripts-get_maintainerpl-add-file-emails-find-embedded-email-addresses-v2 has been removed from the -mm tree. Its filename was scripts-get_maintainerpl-add-file-emails-find-embedded-email-addresses-v2.patch This patch was dropped because it was folded into scripts-get_maintainerpl-add-file-emails-find-embedded-email-addresses.patch The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/ ------------------------------------------------------ Subject: scripts-get_maintainerpl-add-file-emails-find-embedded-email-addresses-v2 From: Joe Perches <joe@xxxxxxxxxxx> nfi what changed Signed-off-by: Joe Perches <joe@xxxxxxxxxxx> Cc: Matt Mackall <mpm@xxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- scripts/get_maintainer.pl | 39 +++++++++++++++++++++++++++--------- 1 file changed, 30 insertions(+), 9 deletions(-) diff -puN scripts/get_maintainer.pl~scripts-get_maintainerpl-add-file-emails-find-embedded-email-addresses-v2 scripts/get_maintainer.pl --- a/scripts/get_maintainer.pl~scripts-get_maintainerpl-add-file-emails-find-embedded-email-addresses-v2 +++ a/scripts/get_maintainer.pl @@ -257,7 +257,7 @@ foreach my $file (@ARGV) { } } if ($file_emails) { - my @poss_addr = $text =~ m$[A-Za-z�-ÿ\"\' \,\.\+-]*\s*[\(\<][A-Za-z0-9_\.\+-]+\@[A-Za-z0-9\.-]+[\)\>]$g; + my @poss_addr = $text =~ m$[A-Za-z�-ÿ\"\' \,\.\+-]*\s*[\,]*\s*[\(\<\{]{0,1}[A-Za-z0-9_\.\+-]+\@[A-Za-z0-9\.-]+\.[A-Za-z0-9]+[\)\>\}]{0,1}$g; push(@file_emails, clean_file_emails(@poss_addr)); } } @@ -1128,25 +1128,46 @@ sub clean_file_emails { my @fmt_emails = (); foreach my $email (@file_emails) { - $email =~ s/\(/\</g; - $email =~ s/\)/\>/g; + $email =~ s/[\(\<\{]{0,1}([A-Za-z0-9_\.\+-]+\@[A-Za-z0-9\.-]+)[\)\>\}]{0,1}/\<$1\>/g; my ($name, $address) = parse_email($email); - my @nw = split(/[^A-Za-z�-ÿ\"\'\,\.\+-]/, $name); + if ($name eq '"[,\.]"') { + $name = ""; + } + + my @nw = split(/[^A-Za-z�-ÿ\'\,\.\+-]/, $name); if (@nw > 2) { - if ((length($nw[@nw - 2]) == 2) && - substr($nw[@nw - 2], 1) eq ".") { - $name = "$nw[@nw - 3] $nw[@nw - 2] $nw[@nw - 1]"; + my $first = $nw[@nw - 3]; + my $middle = $nw[@nw - 2]; + my $last = $nw[@nw - 1]; + + if (((length($first) == 1 && $first =~ m/[A-Za-z]/) || + (length($first) == 2 && substr($first, -1) eq ".")) || + (length($middle) == 1 || + (length($middle) == 2 && substr($middle, -1) eq "."))) { + $name = "$first $middle $last"; } else { - $name = "$nw[@nw - 2] $nw[@nw - 1]"; + $name = "$middle $last"; } } + + if (substr($name, -1) =~ /[,\.]/) { + $name = substr($name, 0, length($name) - 1); + } elsif (substr($name, -2) =~ /[,\.]"/) { + $name = substr($name, 0, length($name) - 2) . '"'; + } + + if (substr($name, 0, 1) =~ /[,\.]/) { + $name = substr($name, 1, length($name) - 1); + } elsif (substr($name, 0, 2) =~ /"[,\.]/) { + $name = '"' . substr($name, 2, length($name) - 2); + } + my $fmt_email = format_email($name, $address, $email_usename); push(@fmt_emails, $fmt_email); } return @fmt_emails; } - sub merge_email { my @lines; my %saw; _ Patches currently in -mm which might be from joe@xxxxxxxxxxx are origin.patch scripts-get_maintainerpl-add-file-emails-find-embedded-email-addresses.patch scripts-get_maintainerpl-add-file-emails-find-embedded-email-addresses-v2.patch scripts-get_maintainerpl-add-sections-print-entire-matched-subsystem.patch scripts-get_maintainerpl-change-sections-to-print-in-the-same-style-as-maintainers.patch scripts-get_maintainerpl-add-ability-to-read-from-stdin.patch get_maintainer-fix-perlcritic-warnings.patch get_maintainer-quote-email-address-with-period.patch scripts-get_maintainerpl-fix-possible-infinite-loop.patch maintainers-remove-amd-geode-f-arch-x86-kernel-geode_32c.patch maintainers-remove-hayes-esp-serial-driver.patch maintainers-update-performance-events-f-patterns.patch maintainers-starmode-radio-ip-strip-moved-to-staging.patch maintainers-wavelan-moved-to-staging.patch maintainers-document-and-add-q-patchwork-queue-entries.patch lib-stringc-simplify-stricmp.patch lib-stringc-simplify-strnstr.patch scripts-checkpatchpl-add-warn-on-sizeof.patch checkpatchpl-allow-80-char-lines-for-logging-functions-not-just-printk.patch checkpatch-warn-on-unnecessary-spaces-before-quoted-newlines.patch drivers-hwmon-vt8231c-fix-continuation-line-formats.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html