The patch titled get_maintainer.pl: allow "K:" pattern tests to match non-patch text has been added to the -mm tree. Its filename is get_maintainerpl-allow-k-pattern-tests-to-match-non-patch-text.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** See http://userweb.kernel.org/~akpm/stuff/added-to-mm.txt to find out what to do about this The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/ ------------------------------------------------------ Subject: get_maintainer.pl: allow "K:" pattern tests to match non-patch text From: Joe Perches <joe@xxxxxxxxxxx> Extend the usage of the K section in the MAINTAINERS file to support matching regular expressions to any arbitrary text that may precede the patch itself. For example, the commit message or mail headers generated by git-format-patch. Signed-off-by: Joe Perches <joe@xxxxxxxxxxx> Original-patch-by: L. Alberto Giménez <agimenez@xxxxxxxxxxx> Acked-by: L. Alberto Giménez <agimenez@xxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- scripts/get_maintainer.pl | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff -puN scripts/get_maintainer.pl~get_maintainerpl-allow-k-pattern-tests-to-match-non-patch-text scripts/get_maintainer.pl --- a/scripts/get_maintainer.pl~get_maintainerpl-allow-k-pattern-tests-to-match-non-patch-text +++ a/scripts/get_maintainer.pl @@ -420,6 +420,14 @@ foreach my $file (@ARGV) { open(my $patch, "< $file") or die "$P: Can't open $file: $!\n"; + + # We can check arbitrary information before the patch + # like the commit message, mail headers, etc... + # This allows us to match arbitrary keywords against any part + # of a git format-patch generated file (subject tags, etc...) + + my $patch_prefix = ""; #Parsing the intro + while (<$patch>) { my $patch_line = $_; if (m/^\+\+\+\s+(\S+)/) { @@ -428,13 +436,14 @@ foreach my $file (@ARGV) { $filename =~ s@\n@@; $lastfile = $filename; push(@files, $filename); + $patch_prefix = "^[+-].*"; #Now parsing the actual patch } elsif (m/^\@\@ -(\d+),(\d+)/) { if ($email_git_blame) { push(@range, "$lastfile:$1:$2"); } } elsif ($keywords) { foreach my $line (keys %keyword_hash) { - if ($patch_line =~ m/^[+-].*$keyword_hash{$line}/x) { + if ($patch_line =~ m/${patch_prefix}$keyword_hash{$line}/x) { push(@keyword_tvi, $line); } } _ Patches currently in -mm which might be from joe@xxxxxxxxxxx are linux-next.patch vsprintf-neaten-%pk-kptr_restrict-save-a-bit-of-code-space.patch printk-allow-setting-default_message_level-via-kconfig.patch get_maintainerpl-allow-k-pattern-tests-to-match-non-patch-text.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html