You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+29-5Lines changed: 29 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,11 +7,12 @@
7
7
`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).
8
8
It's meant to help identify who the most relevant contributors are based on commit recency, frequency and impact.
9
9
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).
11
11
-**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.
12
12
-**score** is the sum of the time decayed impact of every commit in a repository, for a given author.
13
13
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).
15
16
16
17
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).
17
18
@@ -26,15 +27,38 @@ brew install gitpert
26
27
```
27
28
28
29
## Usage
29
-
TODO
30
+
31
+
Running
32
+
33
+
```
34
+
gitpert
35
+
```
36
+
37
+
in a git repository will output a ranking table like so:
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.
30
54
31
55
## FAQ
32
56
33
57
### 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.
35
59
36
60
### 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.
38
62
39
63
### Should LOC added be weighed the same as LOC removed?
40
64
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