Showing the changes to scripts (1 of 1 file). Show all
Unified · Split
| @@ -55,7 +55,7 @@ foreach my $chief (@penguin_chief) { · 54 unmodified lines | ||
| 55 | 55 | } |
| 56 | 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 | 59 | my $rfc822_lwsp = "(?:(?:\\r\\n)?[ \\t])"; |
| 60 | 60 | my $rfc822_char = '[\\000-\\177]'; |
| 61 | 61 | |
| @@ -396,7 +396,19 @@ sub add_categories { · 334 unmodified lines | ||
| 396 | 396 | } |
| 397 | 397 | } |
| 398 | 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 | 412 | push_email_addresses($pvalue); |
| 401 | 413 | } |
| 402 | 414 | } elsif ($ptype eq "T") { |
| @@ -436,13 +448,16 @@ sub push_email_addresses { · 33 unmodified lines | ||
| 436 | 448 | |
| 437 | 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 | 454 | my $array_count = shift(@address_list); |
| 441 | 455 | while (my $entry = shift(@address_list)) { |
| 442 | 456 | push_email_address($entry); |
| 443 | 457 | } |
| 458 | + } else { | |
| 459 | + warn("Invalid MAINTAINERS address: '" . $address . "'\n"); | |
| 444 | 460 | } |
| 445 | − | |
| 446 | 461 | } |
| 447 | 462 | |
| 448 | 463 | sub which { |
| @@ -471,9 +486,8 @@ sub recent_git_signoffs { · 22 unmodified lines | ||
| 471 | 486 | return; |
| 472 | 487 | } |
| 473 | 488 | if (!(-d ".git")) { |
| 474 | − warn("$P: .git repository not found.\n"); | |
| 475 | − warn("Use a .git repository for better results.\n"); | |
| 476 | − warn("ie: git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git\n"); | |
| 489 | + warn("$P: .git directory not found. 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"); | |
| 477 | 491 | return; |
| 478 | 492 | } |
| 479 | 493 | |
| @@ -632,7 +646,7 @@ sub rfc822_validlist ($) { · 152 unmodified lines | ||
| 632 | 646 | my @r; |
| 633 | 647 | if ($s =~ m/^(?:$rfc822re)?(?:,(?:$rfc822re)?)*$/so && |
| 634 | 648 | $s =~ m/^$rfc822_char*$/) { |
| 635 | − while($s =~ m/(?:^|,$rfc822_lwsp*)($rfc822re)/gos) { | |
| 649 | + while ($s =~ m/(?:^|,$rfc822_lwsp*)($rfc822re)/gos) { | |
| 636 | 650 | push @r, $1; |
| 637 | 651 | } |
| 638 | 652 | return wantarray ? (scalar(@r), @r) : 1; |