public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-kernel@vger.kernel.org, torvalds@linux-foundation.org,
	randy.dunlap@oracle.com, pavel@suse.cz, ukleinek@strlen.de
Subject: Re: [PATCH 1/8] Add scripts/get_maintainer.pl
Date: Mon, 27 Oct 2008 16:46:45 -0700	[thread overview]
Message-ID: <1225151205.5269.102.camel@localhost> (raw)
In-Reply-To: <20081027155254.a710c779.akpm@linux-foundation.org>

On Mon, 2008-10-27 at 15:52 -0700, Andrew Morton wrote:
> On Thu, 23 Oct 2008 16:09:19 -0700
> Joe Perches <joe@perches.com> wrote:
> 
> > A script to parse file pattern information in MAINTAINERS
> > and return selected information about a file or patch
> > 
> > $ scripts/get_maintainer.pl
> > usage: ./scripts/get_maintainer.pl [options] patchfile
> >        ./scripts/get_maintainer.pl [options] -f file
> > version: 0.12
> 
> Example output would be nice to see.  Hopefully it is in the
> 
> 	Joe Perches <joe@perches.com>
> 
> form, ready to be pasted into an email client?

Yes.  It's also suitable for use with git-send-email --cc-cmd

Some examples picking a random file (drivers/net/b44.c):

Get maintainers for a single file
(this includes git -by: signatories and the script does a
sort | uniq so the maintainer is not listed first)

$ ./scripts/get_maintainer.pl -f drivers/net/b44.c
"Miguel Botón" <mboton@gmail.com>
Gary Zambrano <zambrano@broadcom.com>
Jeff Garzik <jeff@garzik.org>
Jeff Garzik <jgarzik@pobox.com>
John W. Linville <linville@tuxdriver.com>
Larry Finger <Larry.Finger@lwfinger.net>
Michael Buesch <mb@bu3sch.de>
netdev@vger.kernel.org

without -git signators

$ ./scripts/get_maintainer.pl -f --nogit drivers/net/b44.c
Gary Zambrano <zambrano@broadcom.com>
Jeff Garzik <jgarzik@pobox.com>
netdev@vger.kernel.org

or without mailing lists

$ ./scripts/get_maintainer.pl -f --nogit --no-l drivers/net/b44.c
Gary Zambrano <zambrano@broadcom.com>
Jeff Garzik <jgarzik@pobox.com>

or without the maintainers, just mailing lists

$ ./scripts/get_maintainer.pl -f --nogit --no-m drivers/net/b44.c
netdev@vger.kernel.org

or get the scm entry

$ ./scripts/get_maintainer.pl -f --nogit --no-email --scm drivers/net/b44.c
git git.kernel.org/pub/scm/linux/kernel/git/jgarzik/netdev-2.6.git

> otoh, we'll sometimes also want the
> 
> 	joe@perches.com,akpm@linux-foundation.org
> 
> form for use by scripts.

That's the --no-multiline option

$ ./scripts/get_maintainer.pl -f --nogit --no-multiline drivers/net/b44.c
Gary Zambrano <zambrano@broadcom.com>, Jeff Garzik <jgarzik@pobox.com>, netdev@vger.kernel.org

Another possibility is to use a patch file: (random old patch file)

$ cat pad.d
diff --git a/drivers/crypto/padlock-sha.c b/drivers/crypto/padlock-sha.c
index c666b4e..1d7c328 100644
--- a/drivers/crypto/padlock-sha.c
+++ b/drivers/crypto/padlock-sha.c
@@ -251,7 +251,7 @@ static struct crypto_alg sha256_alg = {
 
 static int __init padlock_init(void)
 {
-	int rc = -ENODEV;
+	int rc;
 
 	if (!cpu_has_phe) {
 		printk(KERN_ERR PFX "VIA PadLock Hash Engine not detected.\n");
$ ./scripts/get_maintainer.pl pad.d
Herbert Xu <herbert@gondor.apana.org.au>
Jeremy Katz <katzj@redhat.com>
Suresh Siddha <suresh.b.siddha@intel.com>
Wolfgang Walter <wolfgang.walter@stwm.de>

>  MAINTAINERS | 1096 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-
>  1 file changed, 1094 insertions(+), 2 deletions(-)
> 
> isn't practical for me or Stephen to carry, I'm afraid.  That's
> probably the most-patched file in the kernel.  This will need to be a
> direct you->Linus thing.

I also think it has to be picked up directly by Linus.

MAINTAINERS is not just probably the most patched file.
It _is_ the most patched file.

$ git log --pretty=oneline --stat | \
  grep -vP "^[a-f0-9]{40,40}" | \
  grep -vP "changed.*insertion.*deletion" | \
  cut -f1 -d"|" | sed -e 's/ //g' | \
  sort | uniq -c | sort -nr | head -5
    733 MAINTAINERS
    718 kernel/sched.c
    440 include/linux/sched.h
    411 include/linux/libata.h
    407 include/linux/ide.h

> I think the feature is sorely needed and will prove useful.

thanks...

cheers, Joe


  reply	other threads:[~2008-10-27 23:47 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-23 23:09 [PATCH 0/8] MAINTAINERS - add script and patterns Joe Perches
2008-10-23 23:09 ` [PATCH 1/8] Add scripts/get_maintainer.pl Joe Perches
2008-10-23 23:09   ` [PATCH 2/8] MAINTAINERS - Add file patterns Joe Perches
2008-10-23 23:09   ` [PATCH 3/8] MAINTAINERS - Standardize style Joe Perches
2008-10-23 23:09   ` [PATCH 4/8] MAINTAINERS - remove CS4280 Joe Perches
2008-10-23 23:09   ` [PATCH 5/8] MAINTAINERS - Remove HP Fibre Channel HBA no longer in tree Joe Perches
2008-10-23 23:09   ` [PATCH 6/8] MAINTAINERS - standardize "T: git urls" Joe Perches
2008-10-23 23:09   ` [PATCH 7/8] MAINTAINERS - Add Linus Torvalds' git Joe Perches
2008-10-23 23:09   ` [PATCH 8/8] MAINTAINERS - Add FTRACE git Joe Perches
2008-10-27 22:52   ` [PATCH 1/8] Add scripts/get_maintainer.pl Andrew Morton
2008-10-27 23:46     ` Joe Perches [this message]
2008-10-28  0:44     ` Joe Perches
2008-10-30 10:41     ` Pavel Machek
2008-10-30 22:43       ` Uwe Kleine-König
2008-10-25  7:41 ` [PATCH 0/8] MAINTAINERS - add script and patterns Pavel Machek
  -- strict thread matches above, loose matches on Subject: below --
2009-03-17 23:19 Joe Perches
2009-03-17 23:19 ` [PATCH 1/8] Add scripts/get_maintainer.pl 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=1225151205.5269.102.camel@localhost \
    --to=joe@perches.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pavel@suse.cz \
    --cc=randy.dunlap@oracle.com \
    --cc=torvalds@linux-foundation.org \
    --cc=ukleinek@strlen.de \
    /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