Skip to content

Commit 9f4431b

Browse files
committed
some README updates, fill out the usage section a bit
1 parent 0fcc627 commit 9f4431b

File tree

1 file changed

+29
-5
lines changed

1 file changed

+29
-5
lines changed

README.md

Lines changed: 29 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,12 @@
77
`gitpert` measures the "pertinence" of git authors as a time-decayed measure of LOC added and removed to a repository (or a set of files in a repository).
88
It's meant to help identify who the most relevant contributors are based on commit recency, frequency and impact.
99

10-
- **impact** in this context is lines of code added plus lines of code removed by a commit. Vendored dependency files are ignored (on a best effort basis).
10+
- **impact** in this context is lines of code added plus lines of code removed by a commit. Vendored dependency files are ignored (as best as possible).
1111
- **decay rate** determines how long it takes for the impact of a commit to halve, based on how recently the commit was made. If the decay rate is 10 days, a commit that added 100 lines of code, authored 10 days ago, will be scored at 50. It is a half-life, and can be supplied as a config parameter.
1212
- **score** is the sum of the time decayed impact of every commit in a repository, for a given author.
1313

14-
The net effect *should* be a ranked list of authors (contributors) where those who have more recently and more frequently contributed "larger" commits surface to the top. An author who committed the initial code many years ago (maybe higher impact) will likely rank lower than an author who has contributed less impactfully, but much more recently (depending on the decay rate and absolute numbers, or course).
14+
The net effect *should* be a ranked list of authors (contributors) where those who have more recently and more frequently contributed "larger" commits surface to the top.
15+
An author who committed the initial code many years ago (maybe higher impact) will likely rank lower than an author who has contributed less impactfully, but much more recently (depending on the decay rate and absolute numbers, of course).
1516

1617
This could be useful for identifying who the best person to review a new code change might be, or who the best person to ask questions or seek help from might be. Scoring can be done at the repository level, and also for individual files (the most pertinent author for a repository might not be the most pertinent for a directory or file within that repository).
1718

@@ -26,15 +27,38 @@ brew install gitpert
2627
```
2728

2829
## Usage
29-
TODO
30+
31+
Running
32+
33+
```
34+
gitpert
35+
```
36+
37+
in a git repository will output a ranking table like so:
38+
39+
```
40+
Rank Email Name Score Impact Commits
41+
1 [email protected] User One 191 6064 92
42+
2 [email protected] User Two 171 931 27
43+
3 [email protected] User Three 40 4366 38
44+
...
45+
```
46+
47+
use the `-d` flag to set the decay rate (in days) `gitpert -d 90` will output a ranking table where score is based on impact that halves at commits made 90 days ago.
48+
49+
```
50+
gitpert -h
51+
```
52+
53+
will have more specific and up to date usage info.
3054

3155
## FAQ
3256

3357
### What about git-blame?
34-
`git-blame` will tell you about the last modification to lines in a file (the author and revision), and is certainly useful. This tool hopes to provide a higher level view of the net effect of authorship in a repository over time.
58+
`git-blame` will tell you about the last modification to lines in a file (the author and revision), and is certainly useful. This tool hopes to provide a higher level view of the net effect of authorship in a repository as a function of time.
3559

3660
### Why are changes to "vendored" dependencies ignored?
37-
Authoring a commit that introduces a large diff because it adds or removes many dependencies (think the `vendor/` directory in golang projects), though in most contexts an important contribution, gives an outsized "impact" to that commit and author which doesn't necessarily reflect how well they "impact" the code of the project itself in that commit.
61+
Authoring a large commit because it adds or removes many dependencies (think the `vendor/` directory in golang projects), while in most contexts an important contribution, gives an outsized "impact" to that commit which probably shouldn't be evaluated in the same way as "typical" LOC.
3862

3963
### Should LOC added be weighed the same as LOC removed?
4064
Maybe. This could be worth exposing as a config parameter. One could argue that a LOC added should weigh some amount more than a LOC removed.

0 commit comments

Comments
 (0)