From a2267eea69333d0556ea2ab071f7f4e039f7d819 Mon Sep 17 00:00:00 2001 From: Anthony PERARD Date: Wed, 1 Jul 2026 18:20:22 +0200 Subject: [PATCH] get_maintainer: Add maintainers based on keyword after removing THE REST There's some logic to avoid CC committers (THE REST section) when a file is fully maintained by a list of maintainers. There's also some logic to add maintainers if a patch or file contains some keywords. We do add maintainers based on keyword to the list of $email_to before checking if we can remove emails from THE REST. And at the time when checking if we can drop THE REST, we've lost the information which tell if the maintainers was added because of a keyword of because they maintain the file. Reorder the logic, add maintainers based on keywords only after checking if we can drop THE REST. For example, if we have a file covered by a sections with only reviewers, but this file also contains the keyword "XSM", then: scripts/get_maintainer.pl -f $file would suppress THE REST without this patch. Signed-off-by: Anthony PERARD Acked-by: Jan Beulich --- scripts/get_maintainer.pl | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/scripts/get_maintainer.pl b/scripts/get_maintainer.pl index 533d0df72a..b788665c08 100755 --- a/scripts/get_maintainer.pl +++ b/scripts/get_maintainer.pl @@ -720,13 +720,6 @@ sub get_maintainers { $suppress_the_rest = 0 if $file_maintained_by_the_rest; } - if ($keywords) { - @keyword_tvi = sort_and_uniq(@keyword_tvi); - foreach my $line (@keyword_tvi) { - add_categories($line); - } - } - if ($email_drop_the_rest_supporter_if_supporter_found && $suppress_the_rest && $#email_to > 0) { my @email_new; @@ -748,6 +741,13 @@ sub get_maintainers { if $do_replace; } + if ($keywords) { + @keyword_tvi = sort_and_uniq(@keyword_tvi); + foreach my $line (@keyword_tvi) { + add_categories($line); + } + } + foreach my $email (@email_to, @list_to) { $email->[0] = deduplicate_email($email->[0]); }