* [PATCH 0/2] get_maintainer improvements
@ 2009-07-09 5:46 Joe Perches
2009-07-09 5:46 ` [PATCH 1/2] scripts/get_maintainer.pl: Add -f directory use Joe Perches
2009-07-09 5:46 ` [PATCH 2/2] MAINTAINERS: Remove directory trailing slash pattern requirement Joe Perches
0 siblings, 2 replies; 3+ messages in thread
From: Joe Perches @ 2009-07-09 5:46 UTC (permalink / raw)
To: linux-kernel; +Cc: Andrew Morton, Arnd Bergmann
Arnd Bergmann pointed out that the directory pattern trailing slash
requirement is unnecessary and error prone. He also sent a patch to
fix it which I've modified a bit.
Andrew Morton wanted the ability to use -f directory. Added it.
Joe Perches (2):
scripts/get_maintainer.pl: Add -f directory use
MAINTAINERS: Remove directory trailing slash pattern requirement
MAINTAINERS | 9 ++++-----
scripts/get_maintainer.pl | 23 +++++++++++++++++++----
2 files changed, 23 insertions(+), 9 deletions(-)
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH 1/2] scripts/get_maintainer.pl: Add -f directory use
2009-07-09 5:46 [PATCH 0/2] get_maintainer improvements Joe Perches
@ 2009-07-09 5:46 ` Joe Perches
2009-07-09 5:46 ` [PATCH 2/2] MAINTAINERS: Remove directory trailing slash pattern requirement Joe Perches
1 sibling, 0 replies; 3+ messages in thread
From: Joe Perches @ 2009-07-09 5:46 UTC (permalink / raw)
To: linux-kernel; +Cc: Andrew Morton, Arnd Bergmann
Don't require a specific file in a directory
to be tested.
Also Arnd Bergmann pointed out that the MAINTAINERS
pattern requirement that directory patterns have a
trailing slash was unnecessary and was likely to be
error prone. Removed that requirement.
Signed-off-by: Joe Perches <joe@perches.com>
---
scripts/get_maintainer.pl | 23 +++++++++++++++++++----
1 files changed, 19 insertions(+), 4 deletions(-)
diff --git a/scripts/get_maintainer.pl b/scripts/get_maintainer.pl
index 3e73314..7fc09fc 100755
--- a/scripts/get_maintainer.pl
+++ b/scripts/get_maintainer.pl
@@ -13,7 +13,7 @@
use strict;
my $P = $0;
-my $V = '0.16';
+my $V = '0.17';
use Getopt::Long qw(:config no_auto_abbrev);
@@ -132,6 +132,10 @@ while (<MAINT>) {
$value =~ s@\.@\\\.@g; ##Convert . to \.
$value =~ s/\*/\.\*/g; ##Convert * to .*
$value =~ s/\?/\./g; ##Convert ? to .
+ ##if pattern is a directory and it lacks a trailing slash, add one
+ if ((-d $value)) {
+ $value =~ s@([^/])$@$1/@;
+ }
}
push(@typevalue, "$type:$value");
} elsif (!/^(\s)*$/) {
@@ -146,8 +150,10 @@ close(MAINT);
my @files = ();
foreach my $file (@ARGV) {
- next if ((-d $file));
- if (!(-f $file)) {
+ ##if $file is a directory and it lacks a trailing slash, add one
+ if ((-d $file)) {
+ $file =~ s@([^/])$@$1/@;
+ } elsif (!(-f $file)) {
die "$P: file '${file}' not found\n";
}
if ($from_filename) {
@@ -292,7 +298,7 @@ sub file_match_pattern {
sub usage {
print <<EOT;
usage: $P [options] patchfile
- $P [options] -f file
+ $P [options] -f file|directory
version: $V
MAINTAINER field selection options:
@@ -322,6 +328,15 @@ Other options:
--version => show version
--help => show this help information
+Notes:
+ Using "-f directory" may give unexpected results:
+
+ Used with "--git", git signators for _all_ files in and below
+ directory are examined as git recurses directories.
+ Any specified X: (exclude) pattern matches are _not_ ignored.
+ Used with "--nogit", directory is used as a pattern match,
+ no individual file within the directory or subdirectory
+ is matched.
EOT
}
--
1.6.3.1.10.g659a0.dirty
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH 2/2] MAINTAINERS: Remove directory trailing slash pattern requirement
2009-07-09 5:46 [PATCH 0/2] get_maintainer improvements Joe Perches
2009-07-09 5:46 ` [PATCH 1/2] scripts/get_maintainer.pl: Add -f directory use Joe Perches
@ 2009-07-09 5:46 ` Joe Perches
1 sibling, 0 replies; 3+ messages in thread
From: Joe Perches @ 2009-07-09 5:46 UTC (permalink / raw)
To: linux-kernel; +Cc: Andrew Morton, Arnd Bergmann
Signed-off-by: Joe Perches <joe@perches.com>
---
MAINTAINERS | 9 ++++-----
1 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/MAINTAINERS b/MAINTAINERS
index e4b1a3d..e4a4de9 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -91,17 +91,16 @@ S: Status, one of the following:
should be using that.
F: Files and directories with wildcard patterns.
- A trailing slash includes all files and subdirectory files.
- F: drivers/net/ all files in and below drivers/net
+ F: drivers/net all files in and below drivers/net
F: drivers/net/* all files in drivers/net, but not below
F: */net/* all files in "any top level directory"/net
One pattern per line. Multiple F: lines acceptable.
X: Files and directories that are NOT maintained, same rules as F:
Files exclusions are tested before file matches.
Can be useful for excluding a specific subdirectory, for instance:
- F: net/
- X: net/ipv6/
- matches all files in and below net excluding net/ipv6/
+ F: net
+ X: net/ipv6
+ matches all files in and below net excluding net/ipv6
3C505 NETWORK DRIVER
P: Philip Blundell
--
1.6.3.1.10.g659a0.dirty
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-07-09 5:47 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-09 5:46 [PATCH 0/2] get_maintainer improvements Joe Perches
2009-07-09 5:46 ` [PATCH 1/2] scripts/get_maintainer.pl: Add -f directory use Joe Perches
2009-07-09 5:46 ` [PATCH 2/2] MAINTAINERS: Remove directory trailing slash pattern requirement Joe Perches
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox