Skip to content

Refactor: Refactor line counting script

Refactor the total line count script to use git worktree, which avoids checkout in the working directory, and replace os.next with linux calls. Whilst this is cleaner, it also won't be supported by Windows.

Improvements:

  • Checks out the repo in a separate tmp directory, rather than checking out commits in the current repo

* Use of multiprocessing to speed up checkout of commits, distributing over n_processes Removed

  • Git commit sampling frequency controlled with alpha to reduce the number of commits sampled for plotting

Resulting line count plot, generated locally using alpha=0.01 takes only a few minutes to produce: Screenshot_2024-08-08_at_13.51.09

Edited by Alex Buccheri

Merge request reports

Loading