diff options
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/get_maintainer.pl | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/scripts/get_maintainer.pl b/scripts/get_maintainer.pl index 35781e0d43e6..fb446e0f8bbf 100755 --- a/scripts/get_maintainer.pl +++ b/scripts/get_maintainer.pl | |||
@@ -211,6 +211,7 @@ foreach my $file (@files) { | |||
211 | if ($type eq 'X') { | 211 | if ($type eq 'X') { |
212 | if (file_match_pattern($file, $value)) { | 212 | if (file_match_pattern($file, $value)) { |
213 | $exclude = 1; | 213 | $exclude = 1; |
214 | last; | ||
214 | } | 215 | } |
215 | } | 216 | } |
216 | } | 217 | } |
@@ -218,18 +219,24 @@ foreach my $file (@files) { | |||
218 | 219 | ||
219 | if (!$exclude) { | 220 | if (!$exclude) { |
220 | my $tvi = 0; | 221 | my $tvi = 0; |
222 | my %hash; | ||
221 | foreach my $line (@typevalue) { | 223 | foreach my $line (@typevalue) { |
222 | if ($line =~ m/^(\C):\s*(.*)/) { | 224 | if ($line =~ m/^(\C):\s*(.*)/) { |
223 | my $type = $1; | 225 | my $type = $1; |
224 | my $value = $2; | 226 | my $value = $2; |
225 | if ($type eq 'F') { | 227 | if ($type eq 'F') { |
226 | if (file_match_pattern($file, $value)) { | 228 | if (file_match_pattern($file, $value)) { |
227 | add_categories($tvi); | 229 | my $pattern_depth = ($value =~ tr@/@@); |
230 | $pattern_depth++ if (!(substr($value,-1,1) eq "/")); | ||
231 | $hash{$tvi} = $pattern_depth; | ||
228 | } | 232 | } |
229 | } | 233 | } |
230 | } | 234 | } |
231 | $tvi++; | 235 | $tvi++; |
232 | } | 236 | } |
237 | foreach my $line (sort {$hash{$b} <=> $hash{$a}} keys %hash) { | ||
238 | add_categories($line); | ||
239 | } | ||
233 | } | 240 | } |
234 | 241 | ||
235 | if ($email && $email_git) { | 242 | if ($email && $email_git) { |