diff options
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/get_maintainer.pl | 38 |
1 files changed, 37 insertions, 1 deletions
diff --git a/scripts/get_maintainer.pl b/scripts/get_maintainer.pl index 43bace2f4ac8..139e0fff8e31 100755 --- a/scripts/get_maintainer.pl +++ b/scripts/get_maintainer.pl | |||
@@ -494,6 +494,40 @@ if ($web) { | |||
494 | 494 | ||
495 | exit($exit); | 495 | exit($exit); |
496 | 496 | ||
497 | sub range_is_maintained { | ||
498 | my ($start, $end) = @_; | ||
499 | |||
500 | for (my $i = $start; $i < $end; $i++) { | ||
501 | my $line = $typevalue[$i]; | ||
502 | if ($line =~ m/^(\C):\s*(.*)/) { | ||
503 | my $type = $1; | ||
504 | my $value = $2; | ||
505 | if ($type eq 'S') { | ||
506 | if ($value =~ /(maintain|support)/i) { | ||
507 | return 1; | ||
508 | } | ||
509 | } | ||
510 | } | ||
511 | } | ||
512 | return 0; | ||
513 | } | ||
514 | |||
515 | sub range_has_maintainer { | ||
516 | my ($start, $end) = @_; | ||
517 | |||
518 | for (my $i = $start; $i < $end; $i++) { | ||
519 | my $line = $typevalue[$i]; | ||
520 | if ($line =~ m/^(\C):\s*(.*)/) { | ||
521 | my $type = $1; | ||
522 | my $value = $2; | ||
523 | if ($type eq 'M') { | ||
524 | return 1; | ||
525 | } | ||
526 | } | ||
527 | } | ||
528 | return 0; | ||
529 | } | ||
530 | |||
497 | sub get_maintainers { | 531 | sub get_maintainers { |
498 | %email_hash_name = (); | 532 | %email_hash_name = (); |
499 | %email_hash_address = (); | 533 | %email_hash_address = (); |
@@ -556,7 +590,9 @@ sub get_maintainers { | |||
556 | my $file_pd = ($file =~ tr@/@@); | 590 | my $file_pd = ($file =~ tr@/@@); |
557 | $value_pd++ if (substr($value,-1,1) ne "/"); | 591 | $value_pd++ if (substr($value,-1,1) ne "/"); |
558 | $value_pd = -1 if ($value =~ /^\.\*/); | 592 | $value_pd = -1 if ($value =~ /^\.\*/); |
559 | if ($value_pd >= $file_pd) { | 593 | if ($value_pd >= $file_pd && |
594 | range_is_maintained($start, $end) && | ||
595 | range_has_maintainer($start, $end)) { | ||
560 | $exact_pattern_match_hash{$file} = 1; | 596 | $exact_pattern_match_hash{$file} = 1; |
561 | } | 597 | } |
562 | if ($pattern_depth == 0 || | 598 | if ($pattern_depth == 0 || |