Skip to content

Instantly share code, notes, and snippets.

@tairov
Forked from fgm/code_heat.bash
Created April 12, 2018 09:00
Show Gist options
  • Save tairov/abf17e937bc9752d0bdfd2071f09edf6 to your computer and use it in GitHub Desktop.
Save tairov/abf17e937bc9752d0bdfd2071f09edf6 to your computer and use it in GitHub Desktop.
#!/bin/bash
# Build a commit frequency list.
ROW_LIMIT=20
git log --name-status $* | \
grep -E '^[A-Z]\s+' | \
cut -c3-500 | \
sort | \
uniq -c | \
grep -vE '^ {6}1 ' | \
sort -n | \
tail --lines="$ROW_LIMIT"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment