git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: whomto.pl -- finding out whom to send patches to

From
RRoel <roel.kluin@gmail.com>
Date
May 30, 2008, 09:29 UTC
Message-ID
<483FC90E.3020404@gmail.com>
In-Reply-To
<20080529210018.GA5508@damson.getinternet.no>
Vegard Nossum schreef:
Show 41 quoted lines
> 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
Previous: Vegard Nossum
Message 8 of 8 in “whomto.pl -- finding out whom to send patches to”
  1. Vegard NossumMay 29, 2008
  2. Joe PerchesMay 29, 2008
  3. Jesper JuhlMay 29, 2008
  4. Junio C HamanoMay 29, 2008
  5. Vegard NossumMay 31, 2008
  6. Andrea RighiMay 30, 2008
  7. Vegard NossumMay 31, 2008
  8. RoelMay 30, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.