From: Taylor Blau <me@ttaylorr.com>
To: Hongyi Zhao <hongyi.zhao@gmail.com>
Cc: "brian m. carlson" <sandals@crustytoothpaste.net>,
Git List <git@vger.kernel.org>
Subject: Re: Method for Calculating Statistics of Developer Contribution to a Specified Branch.
Date: Mon, 30 Oct 2023 17:49:29 -0400 [thread overview]
Message-ID: <ZUAk6dPJyhfb7UBM@nand.local> (raw)
In-Reply-To: <CAGP6PO+SeZPzD21nErX=Vq=+d6oy-kg+diu=irot3enOhpQNMg@mail.gmail.com>
On Tue, Oct 17, 2023 at 07:37:46PM +0800, Hongyi Zhao wrote:
> I want to calculate a certain developer's contribution based on
> different standards of code line count and the importance of the code.
I agree with brian that "number of lines added/removed" is not a perfect
measure of productivity ;-).
But I think that there is a slightly cleaner way to compute the result
you're after, like so:
git rev-list --author="$who" origin/main |
git diff-tree --stdin -r --numstat --no-commit-id |
awk '{ s += $1 + $2 } END { print s }'
Thanks,
Taylor
next prev parent reply other threads:[~2023-10-30 21:49 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-16 14:10 Method for Calculating Statistics of Developer Contribution to a Specified Branch Hongyi Zhao
2023-10-16 21:25 ` brian m. carlson
2023-10-17 11:37 ` Hongyi Zhao
2023-10-30 21:49 ` Taylor Blau [this message]
2023-10-31 5:09 ` Hongyi Zhao
2023-10-31 6:25 ` Junio C Hamano
2023-10-31 19:05 ` Taylor Blau
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=ZUAk6dPJyhfb7UBM@nand.local \
--to=me@ttaylorr.com \
--cc=git@vger.kernel.org \
--cc=hongyi.zhao@gmail.com \
--cc=sandals@crustytoothpaste.net \
/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).