Thread (5 messages) 5 messages, 3 authors, 2023-10-31

Re: Method for Calculating Statistics of Developer Contribution to a Specified Branch.

From: Taylor Blau <hidden>
Date: 2023-10-30 21:49:32

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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help