Skip to contentSkip to conversation

get_maintainer: Don't spam others in fallback mode if there is a maintainer

PATCH New Thomas Huth 1 participant 1 message Jul 23 GET_MAINTAINER script

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 get_maintainer: Don't spam others in fallback mode if there is a maintainer

From: Thomas Huth <[email protected]>

The get_maintainer.pl script currently suggests to CC: people who contributed to a subfolder of a maintained subsystem, e.g.:

 $ scripts/get_maintainer.pl -f arch/arm64/include/asm/smp.h
 Catalin Marinas <[email protected]> (maintainer:ARM64 PORT (AARCH64 ARCHITECTURE),commit_signer:1/1=100%)
 Will Deacon <[email protected]> (maintainer:ARM64 PORT (AARCH64 ARCHITECTURE))
 Thomas Huth <[email protected]> (commit_signer:1/1=100%,authored:1/1=100%,added_lines:2/2=100%,removed_lines:2/2=100%)
 [email protected] (moderated list:ARM64 PORT (AARCH64 ARCHITECTURE))
 [email protected] (open list)

So if you contributed a single line to a subfolder of a maintained and active subsystem, you get regularly CC:-ed for all other changes to the corresponding file during the next year. That's quite excessive.

Limit the fallback mode to files that are not maintained at all by removing the check for subfolders in the corresponding part of the code.

---
 scripts/get_maintainer.pl | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
scripts/get_maintainer.pl +1 -2
index 16b80a700d4ac..ded73b9673eb9 100755
@@ -938,8 +938,7 @@ sub get_maintainers {
 				my $file_pd = ($file  =~ tr@/@@);
 				$value_pd++ if (substr($value,-1,1) ne "/");
 				$value_pd = -1 if ($value =~ /^(\.\*|\(\?:\.\*\))/);
-				if ($value_pd >= $file_pd &&
-				    range_is_maintained($start, $end) &&
+				if (range_is_maintained($start, $end) &&
 				    range_has_maintainer($start, $end)) {
 				    $exact_pattern_match_hash{$file} = 1;
 				}
Signature · 1 line
2.55.0