From: Joe Perches <joe@perches.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Don Zickus <dzickus@redhat.com>, LKML <linux-kernel@vger.kernel.org>
Subject: [PATCH] get_maintainer: Allow option --mpath <directory> to read all files in <directory>
Date: Mon, 13 Aug 2018 18:12:44 -0700 [thread overview]
Message-ID: <991b2f20112d53863cd79e61d908f1d26d3e1971.camel@perches.com> (raw)
There is an external use case for multiple private MAINTAINER
style files in a separate directory. Allow it.
--mpath has a default of "./MAINTAINERS".
The value entered can be either a file or a directory.
The behaviors are now:
--mpath <file> Read only the specific file as <MAINTAINER_TYPE> file
--mpath <directory> Read all files in <directory> as <MAINTAINER_TYPE> files
--mpath <directory> --find-maintainer-files
Recurse through <directory> and read all files named MAINTAINERS
Signed-off-by: Joe Perches <joe@perches.com>
---
scripts/get_maintainer.pl | 13 ++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)
diff --git a/scripts/get_maintainer.pl b/scripts/get_maintainer.pl
index 0ebdefe74d5b..c1c088ef1420 100755
--- a/scripts/get_maintainer.pl
+++ b/scripts/get_maintainer.pl
@@ -396,7 +396,12 @@ sub read_all_maintainer_files {
if (-d $path) {
$path .= '/' if ($path !~ m@/$@);
- if ($path eq "${lk_path}MAINTAINERS/") {
+ if ($find_maintainer_files) {
+ find( { wanted => \&find_is_maintainer_file,
+ preprocess => \&find_ignore_git,
+ no_chdir => 1,
+ }, "$path");
+ } else {
opendir(DIR, "$path") or die $!;
my @files = readdir(DIR);
closedir(DIR);
@@ -404,12 +409,6 @@ sub read_all_maintainer_files {
push(@mfiles, "$path$file") if ($file !~ /^\./);
}
}
- if ($find_maintainer_files) {
- find( { wanted => \&find_is_maintainer_file,
- preprocess => \&find_ignore_git,
- no_chdir => 1,
- }, "$path");
- }
} elsif (-f "$path") {
push(@mfiles, "$path");
} else {
next reply other threads:[~2018-08-14 1:14 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-14 1:12 Joe Perches [this message]
2018-08-15 21:07 ` [PATCH] get_maintainer: Allow option --mpath <directory> to read all files in <directory> Don Zickus
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=991b2f20112d53863cd79e61d908f1d26d3e1971.camel@perches.com \
--to=joe@perches.com \
--cc=akpm@linux-foundation.org \
--cc=dzickus@redhat.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).