diff options
| author | Anton Bobov <anton@bobov.name> | 2024-03-05 22:18:49 +0500 |
|---|---|---|
| committer | Anton Bobov <anton@bobov.name> | 2024-03-05 22:25:05 +0500 |
| commit | e2917305c959106ab01018b4c768505fb2f655ac (patch) | |
| tree | 55079dff911c81a5f9dbb84f3e584353a74c28ad /git-hotspots | |
| parent | c1c648cabb419a0f281e32685287ca1e07e9271f (diff) | |
Updates
Diffstat (limited to 'git-hotspots')
| -rwxr-xr-x | git-hotspots | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/git-hotspots b/git-hotspots new file mode 100755 index 0000000..a18ce61 --- /dev/null +++ b/git-hotspots @@ -0,0 +1,17 @@ +#!/bin/bash +# https://docs.mergestat.com/blog/2023/01/03/finding-code-hotspots-in-git-repos +# +# Finds hotspots as the files most frequently modified (by number of commits). + +set -euo pipefail + +main() { + git log --format=format: --name-only --since=12.month "$@" | + grep -vE '^$' | + sort | + uniq -c | + sort -nr | + head -50 +} + +main "$@" |
