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

Re: Insertions/Deletions summary for a contributor

From
Jeff King <peff@peff.net>
Date
Oct 29, 2009, 16:01 UTC
Message-ID
<20091029160156.GA7622@sigill.intra.peff.net>
In-Reply-To
<a362e8010910282344vad53b7ck1b7ae04ff3c499ed@mail.gmail.com>
On Thu, Oct 29, 2009 at 07:44:40AM +0100, Laszlo Papp wrote:
Show 7 quoted lines
> It would be nice to see summary for a contributor in insertions/deletions
> lines, changed files regard, in the life of the whole project.
> 
> So the output would be the summary of the following output lines:
> git log --author="Laszlo Papp" --pretty=tformat: --numstat
> 
> Can I deal with it, does it make sense, what do you think about it ?
Try piping the output of the command above through:
  perl -ane '
        $add{$F[2]} += $F[0];
        $del{$F[2]} += $F[1];
        END { print "$add{$_} $del{$_} $_\n" foreach sort keys(%add) }
  '

but keep in mind that such a summary is not necessarily a useful value. Modified lines are represented as deletion and add, and you may simply be deleting and adding the same lines over and over again. :)

A more interesting summary is to "git blame" files and count contributor lines. This shows content by that contributor which has survived to the current tree.

-Peff
Previous: Laszlo Papp
Message 2 of 2 in “Insertions/Deletions summary for a contributor”
  1. Laszlo PappOct 29, 2009
  2. Jeff KingOct 29, 2009

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.