diff options
author | Joe Perches <joe@perches.com> | 2009-06-16 18:34:02 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-06-16 22:47:54 -0400 |
commit | 5f2441e97684cfc787873f884c715e109ffcfbcd (patch) | |
tree | e11b81acea7e8b2465b0338b4a5cd4f833637893 /scripts/get_maintainer.pl | |
parent | d789504ab03c27b194170262cb4ffda38905c5c0 (diff) |
scripts/get_maintainer.pl: support both "P:/M:" and integrated "M:" lines
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'scripts/get_maintainer.pl')
-rwxr-xr-x | scripts/get_maintainer.pl | 30 |
1 files changed, 22 insertions, 8 deletions
diff --git a/scripts/get_maintainer.pl b/scripts/get_maintainer.pl index 159ce64ad26b..a1a43cffbc96 100755 --- a/scripts/get_maintainer.pl +++ b/scripts/get_maintainer.pl | |||
@@ -55,7 +55,7 @@ foreach my $chief (@penguin_chief) { | |||
55 | } | 55 | } |
56 | my $penguin_chiefs = "\(" . join("|",@penguin_chief_names) . "\)"; | 56 | my $penguin_chiefs = "\(" . join("|",@penguin_chief_names) . "\)"; |
57 | 57 | ||
58 | # rfc822 - preloaded methods go here. | 58 | # rfc822 email address - preloaded methods go here. |
59 | my $rfc822_lwsp = "(?:(?:\\r\\n)?[ \\t])"; | 59 | my $rfc822_lwsp = "(?:(?:\\r\\n)?[ \\t])"; |
60 | my $rfc822_char = '[\\000-\\177]'; | 60 | my $rfc822_char = '[\\000-\\177]'; |
61 | 61 | ||
@@ -396,7 +396,19 @@ sub add_categories { | |||
396 | } | 396 | } |
397 | } | 397 | } |
398 | } elsif ($ptype eq "M") { | 398 | } elsif ($ptype eq "M") { |
399 | if ($email_maintainer) { | 399 | my $p_used = 0; |
400 | if ($index >= 0) { | ||
401 | my $tv = $typevalue[$index - 1]; | ||
402 | if ($tv =~ m/^(\C):\s*(.*)/) { | ||
403 | if ($1 eq "P") { | ||
404 | if ($email_usename) { | ||
405 | push_email_address(format_email($2, $pvalue)); | ||
406 | $p_used = 1; | ||
407 | } | ||
408 | } | ||
409 | } | ||
410 | } | ||
411 | if (!$p_used) { | ||
400 | push_email_addresses($pvalue); | 412 | push_email_addresses($pvalue); |
401 | } | 413 | } |
402 | } elsif ($ptype eq "T") { | 414 | } elsif ($ptype eq "T") { |
@@ -436,13 +448,16 @@ sub push_email_addresses { | |||
436 | 448 | ||
437 | my @address_list = (); | 449 | my @address_list = (); |
438 | 450 | ||
439 | if (@address_list = rfc822_validlist($address)) { | 451 | if (rfc822_valid($address)) { |
452 | push_email_address($address); | ||
453 | } elsif (@address_list = rfc822_validlist($address)) { | ||
440 | my $array_count = shift(@address_list); | 454 | my $array_count = shift(@address_list); |
441 | while (my $entry = shift(@address_list)) { | 455 | while (my $entry = shift(@address_list)) { |
442 | push_email_address($entry); | 456 | push_email_address($entry); |
443 | } | 457 | } |
458 | } else { | ||
459 | warn("Invalid MAINTAINERS address: '" . $address . "'\n"); | ||
444 | } | 460 | } |
445 | |||
446 | } | 461 | } |
447 | 462 | ||
448 | sub which { | 463 | sub which { |
@@ -471,9 +486,8 @@ sub recent_git_signoffs { | |||
471 | return; | 486 | return; |
472 | } | 487 | } |
473 | if (!(-d ".git")) { | 488 | if (!(-d ".git")) { |
474 | warn("$P: .git repository not found.\n"); | 489 | warn("$P: .git directory not found. Use a git repository for better results.\n"); |
475 | warn("Use a .git repository for better results.\n"); | 490 | warn("$P: perhaps 'git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git'\n"); |
476 | warn("ie: git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git\n"); | ||
477 | return; | 491 | return; |
478 | } | 492 | } |
479 | 493 | ||
@@ -632,7 +646,7 @@ sub rfc822_validlist ($) { | |||
632 | my @r; | 646 | my @r; |
633 | if ($s =~ m/^(?:$rfc822re)?(?:,(?:$rfc822re)?)*$/so && | 647 | if ($s =~ m/^(?:$rfc822re)?(?:,(?:$rfc822re)?)*$/so && |
634 | $s =~ m/^$rfc822_char*$/) { | 648 | $s =~ m/^$rfc822_char*$/) { |
635 | while($s =~ m/(?:^|,$rfc822_lwsp*)($rfc822re)/gos) { | 649 | while ($s =~ m/(?:^|,$rfc822_lwsp*)($rfc822re)/gos) { |
636 | push @r, $1; | 650 | push @r, $1; |
637 | } | 651 | } |
638 | return wantarray ? (scalar(@r), @r) : 1; | 652 | return wantarray ? (scalar(@r), @r) : 1; |