linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] get_maintainer.pl: Add optional .get_maintainer.MAINTAINERS override
@ 2018-06-26 18:25 Prarit Bhargava
  2018-06-26 20:16 ` Joe Perches
  0 siblings, 1 reply; 22+ messages in thread
From: Prarit Bhargava @ 2018-06-26 18:25 UTC (permalink / raw)
  To: linux-kernel; +Cc: Prarit Bhargava, Joe Perches, dzickus, jtoppins

OSes have additional maintainers that should be cc'd on patches or may
want to circulate internal patches.

Parse the .get_maintainer.MAINTAINERS file.  Entries in the file
can begin with a '+' to indicate the email and list entries should be
added to the exiting MAINTAINERS output, or a '-' to indicate that the
entries should override the existing MAINTAINERS file.

Also add a help entry for the .get_maintainers.ignore file.

Signed-off-by: Prarit Bhargava <prarit@redhat.com>
Cc: Joe Perches <joe@perches.com>
Cc: dzickus@redhat.com
Cc: jtoppins@redhat.com
---
 scripts/get_maintainer.pl | 34 ++++++++++++++++++++++++++++++++++
 1 file changed, 34 insertions(+)

diff --git a/scripts/get_maintainer.pl b/scripts/get_maintainer.pl
index c87fa734e3e1..239f4d2ce972 100755
--- a/scripts/get_maintainer.pl
+++ b/scripts/get_maintainer.pl
@@ -384,6 +384,32 @@ sub find_ignore_git {
 read_all_maintainer_files();
 
 sub read_all_maintainer_files {
+	my $conf = which_conf(".get_maintainer.MAINTAINERS");
+	if ( -f $conf) {
+	    my @conf_args;
+	    my $add = 0;
+	    open(my $conffile, '<', "$conf")
+		or warn "$P: Can't find a readable .get_maintainer.MAINTAINERS file $!\n";
+	    while (<$conffile>) {
+		my $line = $_;
+		if ($line =~ m/^\+/ ) {
+		    $add = 1;
+		}
+		next if ($line =~ m/^\s*#/);
+		$line =~ s/^\+//g;
+		$line =~ s/^\-//g;
+		$line =~ s/\s*\n?$//;
+		push(@mfiles, $line);
+	    }
+	    close($conffile);
+	    if ($add eq 0) {
+		foreach my $file (@mfiles) {
+		     read_maintainer_file("$file");
+		}
+		return;
+	    }
+	}
+
     if (-d "${lk_path}MAINTAINERS") {
         opendir(DIR, "${lk_path}MAINTAINERS") or die $!;
         my @files = readdir(DIR);
@@ -1068,6 +1094,14 @@ Notes:
       Entries in this file can be any command line argument.
       This file is prepended to any additional command line arguments.
       Multiple lines and # comments are allowed.
+  File ".get_maintainer.ignore", if it exists in the linux kernel source root
+      directory, can contain a list of email addresses to ignore.  Multiple
+      lines and # comments are allowed.
+  File ".get_maintainer.MAINTAINERS", if it exists in the linux kernel source
+      root directory, can change the location of the MAINTAINERS file.
+      Entries beginning with a '+' are added to the default list, and
+      entries beginning with a '-' override the existing MAINTAINERS list
+      lookup.  Multiple lines and # comments are allowed.
   Most options have both positive and negative forms.
       The negative forms for --<foo> are --no<foo> and --no-<foo>.
 
-- 
2.14.4


^ permalink raw reply related	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2018-08-04  1:11 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-26 18:25 [PATCH] get_maintainer.pl: Add optional .get_maintainer.MAINTAINERS override Prarit Bhargava
2018-06-26 20:16 ` Joe Perches
2018-06-26 22:52   ` Prarit Bhargava
2018-06-26 23:04     ` Joe Perches
2018-06-26 23:29       ` Prarit Bhargava
2018-07-06 17:54   ` Don Zickus
2018-07-06 18:31     ` Joe Perches
2018-07-06 18:44       ` Don Zickus
2018-07-06 19:39         ` Prarit Bhargava
2018-07-06 21:36           ` Joe Perches
2018-07-06 21:58             ` Don Zickus
2018-07-06 22:09               ` Joe Perches
2018-07-06 22:12                 ` Don Zickus
2018-07-06 22:14                 ` Joe Perches
2018-07-06 22:30                   ` Don Zickus
2018-07-06 22:32                   ` Don Zickus
2018-07-13 18:51                   ` Don Zickus
2018-07-14  0:11                     ` Joe Perches
2018-07-16 21:20                       ` Don Zickus
2018-07-30 18:48                         ` Don Zickus
2018-07-06 19:47       ` Don Zickus
2018-08-04  1:11     ` [PATCH] get_maintainer.pl: Add -mpath=<path or file> for MAINTAINERS file location Joe Perches

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).