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
+19-5Lines changed: 19 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,20 +9,34 @@ Code churn has several definitions, the one that to me provides the most value a
9
9
10
10
Solutions that I've found online looked at changes to files irrespective whether these are new changes or edits to existing lines of code (LOC) within existing files. Hence this solution that segments line-of-code edits (churn) with new code changes (contribution).
11
11
12
+
*Tested with Python version 3.5.3 and Git version 2.20.1*
13
+
12
14
# How it works
13
15
This script looks at a range of commits per author. For each commit it bookkeeps the files that were changed along with the LOC for each file. LOC are kept in a sparse structure and changes per LOC are taken into account as the program loops. When a change to the same LOC is detected it updates this separately to bookkeep the true code churn.
14
16
Result is a print with aggregated contribution and churn per author for a given time period.
15
17
16
-
Tested with Python version 3.5.3 and Git version 2.20.1
18
+
***Note:*** This includes the `--no-merges` flag as it assumes that merge commits with or without merge conflicts are not indicative of churn.
17
19
18
20
# Usage
21
+
Positional (required) arguments:
22
+
-**after** after a certain date, in YYYY[-MM[-DD]] format
23
+
-**before** before a certain date, in YYYY[-MM[-DD]] format
24
+
-**author** author string (not committer)
25
+
-**dir** include Git repository directory
26
+
27
+
Optional arguments:
28
+
-**-h, --h, --help** show this help message and exit
0 commit comments