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

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

From
Junio C Hamano <gitster@pobox.com>
Date
May 29, 2008, 23:33 UTC
Message-ID
<7vr6bkofct.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<20080529210018.GA5508@damson.getinternet.no>
Vegard Nossum <vegard.nossum@gmail.com> writes:
Show 11 quoted lines
> 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...

"git blame" does not give irrelevant commits in its output, with or without --incremental. Perhaps you were thinking about the "oops, earlier one was wrong, here are the corrections" behaviour of "git log --early-output", which is an unrelated mechanism in a different command.

But I have to wonder why you used --incremental and not --porcelain format, the latter of which is more compact and is designed for parsing by tools.

I also have to wonder why you did not use -M, -C, and/or -w, if you used blame to find the true origin of lines that are involved.

Unless the patch is truly about a narrow region of a handful files (e.g. micro-optimizing the implementation of a single function without changing its external interface at all, or fixing an off-by-one error in a group of functions that do similar things), I suspect that it would make more sense to use "git shortlog --no-merges -- paths" to get the list of people who are involved in the general area, even though they may not have been involved in particular _lines_ that the patch touches. For example, if a patch changes the lines in a function's implementation, you would want input not only from the people who improved the implementation of the function over the years, but more from the people who care about the calling sites of that function the patch is touching.

Previous: Jesper JuhlNext: Vegard Nossum
Message 4 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.