From: Stefan Richter <stefanr@s5r6.in-berlin.de>
To: Joe Perches <joe@perches.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH V2 (changelog update only)] scripts/get_maintainer.pl: Add --sections, print entire matched subsystem
Date: Fri, 15 Jan 2010 15:28:03 +0100 [thread overview]
Message-ID: <4B507B73.6000404@s5r6.in-berlin.de> (raw)
In-Reply-To: <1263519770.1903.49.camel@Joe-Laptop.home>
Joe Perches wrote:
> Sample output:
>
> $ ./scripts/get_maintainer.pl --sections -f drivers/net/usb/smsc95xx.c
> USB SMSC95XX ETHERNET DRIVER
> M:Steve Glendinning <steve.glendinning@smsc.com>
> L:netdev@vger.kernel.org
> S:Supported
> F:drivers/net/usb/smsc95xx.*
> USB SUBSYSTEM
> M:Greg Kroah-Hartman <gregkh@suse.de>
> L:linux-usb@vger.kernel.org
> W:http://www.linux-usb.org
> T:quilt kernel.org/pub/linux/kernel/people/gregkh/gregkh-2.6/
[...]
Should it be machine-readable, or only human-readable?
In the latter case, some whitespace could be nice, like:
$ ./scripts/get_maintainer.pl --sections -f drivers/net/usb/smsc95xx.c
USB SMSC95XX ETHERNET DRIVER
M:Steve Glendinning <steve.glendinning@smsc.com>
L:netdev@vger.kernel.org
S:Supported
F:drivers/net/usb/smsc95xx.*
USB SUBSYSTEM
M:Greg Kroah-Hartman <gregkh@suse.de>
L:linux-usb@vger.kernel.org
W:http://www.linux-usb.org
T:quilt kernel.org/pub/linux/kernel/people/gregkh/gregkh-2.6/
[...]
For example,
> @@ -346,6 +358,21 @@ foreach my $file (@files) {
> }
> foreach my $line (sort {$hash{$b} <=> $hash{$a}} keys %hash) {
> add_categories($line);
> + if ($sections) {
> + my $i;
> + my $start = find_starting_index($line);
> + my $end = find_ending_index($line);
> + for ($i = $start; $i < $end; $i++) {
> + my $line = $typevalue[$i];
> + if ($line =~ /^[FX]:/) { ##Restore file patterns
> + $line =~ s/([^\\])\.([^\*])/$1\?$2/g;
> + $line =~ s/([^\\])\.$/$1\?/g; ##Convert . back to ?
> + $line =~ s/\\\./\./g; ##Convert \. to .
> + $line =~ s/\.\*/\*/g; ##Convert .* to *
> + }
if ($line =~ /^.:/)
print(" ");
else
print("\n");
> + print("$line\n");
> + }
> + }
> }
> }
>
--
Stefan Richter
-=====-==-=- ---= -====
http://arcgraph.de/sr/
next prev parent reply other threads:[~2010-01-15 14:29 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-13 18:41 [PATCH] " Joe Perches
2010-01-14 23:12 ` Andrew Morton
2010-01-15 1:42 ` [PATCH V2 (changelog update only)] " Joe Perches
2010-01-15 14:28 ` Stefan Richter [this message]
2010-01-16 0:43 ` Joe Perches
2010-01-16 0:57 ` Stefan Richter
2010-01-16 1:52 ` [PATCH] scripts/get_maintainer.pl: Change --sections to print in the same style as MAINTAINERS Joe Perches
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=4B507B73.6000404@s5r6.in-berlin.de \
--to=stefanr@s5r6.in-berlin.de \
--cc=akpm@linux-foundation.org \
--cc=joe@perches.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
all inboxes | Powered by JetHome®