From: Roel <roel.kluin@gmail.com>
To: Vegard Nossum <vegard.nossum@gmail.com>
Cc: linux-kernel@vger.kernel.org,
Jan Engelhardt <jengelh@computergmbh.de>,
Sverre Rabbelier <alturin@gmail.com>,
Joe Perches <joe@perches.com>,
git@vger.kernel.org
Subject: Re: whomto.pl -- finding out whom to send patches to
Date: Fri, 30 May 2008 11:29:50 +0200 [thread overview]
Message-ID: <483FC90E.3020404@gmail.com> (raw)
In-Reply-To: <20080529210018.GA5508@damson.getinternet.no>
Vegard Nossum schreef:
> Hi,
>
> I've written this perl script that takes a patch as input and prints the
> authors/committers of the affected lines, using git-blame as the back end.
>
> (The purpose of this is of course to find out whom to send patches to.)
>
> There are some caveats:
>
> - If I've understood correctly, git-blame incremental output doesn't split
> commits when a newer one is found, so we currently possibly take into
> account more than just the last patch to touch a line. This might not be
> a disadvantage, however...
>
> - The patch must apply to the current working tree. I suppose there is
> some way to use the index information in the patch to determine what to
> run git-blame against, but this is currently beyond my git knowledge.
>
> - It's a bit slow, particularly for large files. But doing the same thing
> by hand would be slower, so I suppose it's an overall improvement.
>
> Running this on a random -mm patch, for example
> http://www.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.26-rc2/2.6.26-rc2-mm1/broken-out/acpi-fix-fadt-parsing.patch
> gives the following output:
>
> $ perl whomto2.pl acpi-fix-fadt-parsing.patch
> Running git-blame on drivers/acpi/tables/tbfadt.c...
>
> To: (Committers)
> 48 Len Brown <len.brown@intel.com>
> Cc: (Authors)
> 44 Bob Moore <robert.moore@intel.com>
> 2 Alexey Starikovskiy <alexey.y.starikovskiy@linux.intel.com>
> 2 Len Brown <len.brown@intel.com>
>
> Maybe this tool can be useful? :-)
>
> (Improvements are of course also welcome.)
>
>
> Vegard
Based on Linus' script to get the email address of a maintainer, I wrote
this bash script to get
an indication of relevant lists. Maybe you can make use of the part that
parses the
MAINTAINERS file for relevant lists?
---
git log --since="1 year ago" "$@" | sed -n "s/^ .[-a-z]*by: \(.*\) <.*$/\1/p" |
sort | uniq | sort -n -r | while read -r name; do
sed -n "/^P:[ \t]*.*$name/,/^$/{
s/^L:[ \t]*\(.*\)$/\1/p
}" ./MAINTAINERS
done | sort | uniq -c | sort -n -r | while read -r nr list; do
tot=`grep -c "^L:\W*.*$list.*" ./MAINTAINERS`
echo "`expr $nr / \( $tot + 1 \)` $nr $tot $list"
done | sort -r | cut -d " " -f2- | while read -r nr tot list; do
echo -e "$nr/$tot Acks were commited by maintainers of list $list"
done
prev parent reply other threads:[~2008-05-30 9:30 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-29 21:00 whomto.pl -- finding out whom to send patches to Vegard Nossum
2008-05-29 18:20 ` Joe Perches
2008-05-29 22:19 ` Jesper Juhl
2008-05-29 23:33 ` Junio C Hamano
2008-05-31 10:33 ` Vegard Nossum
2008-05-30 7:58 ` Andrea Righi
2008-05-31 10:03 ` Vegard Nossum
2008-05-30 9:29 ` Roel [this message]
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=483FC90E.3020404@gmail.com \
--to=roel.kluin@gmail.com \
--cc=alturin@gmail.com \
--cc=git@vger.kernel.org \
--cc=jengelh@computergmbh.de \
--cc=joe@perches.com \
--cc=linux-kernel@vger.kernel.org \
--cc=vegard.nossum@gmail.com \
/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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).