What is --loc=surv
? I can't find any definition for it anywhere.
For getting the contribution stats in a git repo, I found git-fame by casperdcl on GitHub. It offers a chart of contributions per contributor.
I don't consider the sum of insertions and deletions in git a good scale. but git-fame offers another option called "surviving lines-of-code" (--loc=surv
). but I don't understand what it is.
When should I use it? Is it a better scale to count contributions?
CodePudding user response:
First, it is not "in git". It is a feature added to casperdcl/git-fame
in its release v1.14.0 Q4 2020, and commit 2d34d84.
Any executable named git-xxx
(in $PATH
) can be called with git xxx
, giving the illusion that xxx
is a Git command. It is not.
Second, as illustrated in issue 59, it is the default option.
I didn't expect any differences between
git-fame
andgit-fame --loc=surviving
- and there are none.
Third, it does measure lines which are still there between commit (which have not been added or removed), which allows to:
- associate options like
--ignore-rev
or--ignore-revs-file=<f>
(valid only for surviving lines), - exlude options like
--cost
(time cost in person-months (COCOMO) or person-hours (based on commit times), which is only based on delta (lines added/removed)
CodePudding user response:
The following was answered by the developer of git-fame
, casperdcl on this issue:
Does it just count the last revision on that line?
--loc=surv
indeed counts "just the last revision on that line." It may be useful to also include -M
and -C
options.
looking for the best way to measure how much I have to pay my devs.
Here be dragons