From: Jeff King <peff@peff.net>
To: Laszlo Papp <djszapi@archlinux.us>
Cc: git@vger.kernel.org
Subject: Re: Insertions/Deletions summary for a contributor
Date: Thu, 29 Oct 2009 12:01:57 -0400 [thread overview]
Message-ID: <20091029160156.GA7622@sigill.intra.peff.net> (raw)
In-Reply-To: <a362e8010910282344vad53b7ck1b7ae04ff3c499ed@mail.gmail.com>
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
prev parent reply other threads:[~2009-10-29 16:02 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-29 6:44 Insertions/Deletions summary for a contributor Laszlo Papp
2009-10-29 16:01 ` Jeff King [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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20091029160156.GA7622@sigill.intra.peff.net \
--to=peff@peff.net \
--cc=djszapi@archlinux.us \
--cc=git@vger.kernel.org \
/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.
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).