git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Insertions/Deletions summary for a contributor
@ 2009-10-29  6:44 Laszlo Papp
  2009-10-29 16:01 ` Jeff King
  0 siblings, 1 reply; 2+ messages in thread
From: Laszlo Papp @ 2009-10-29  6:44 UTC (permalink / raw)
  To: git

Hello,

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 ?

Best Regards,
Laszlo Papp

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Insertions/Deletions summary for a contributor
  2009-10-29  6:44 Insertions/Deletions summary for a contributor Laszlo Papp
@ 2009-10-29 16:01 ` Jeff King
  0 siblings, 0 replies; 2+ messages in thread
From: Jeff King @ 2009-10-29 16:01 UTC (permalink / raw)
  To: Laszlo Papp; +Cc: git

On Thu, Oct 29, 2009 at 07:44:40AM +0100, Laszlo Papp wrote:

> 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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-10-29 16:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-29  6:44 Insertions/Deletions summary for a contributor Laszlo Papp
2009-10-29 16:01 ` Jeff King

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 NNTP newsgroup(s).