[bin] add git-authors to dotfiles

This commit is contained in:
Felix Buehler 2019-11-16 14:38:42 +01:00
parent 0bea48b8b6
commit 40042ff35e
2 changed files with 11 additions and 0 deletions

10
bin/git-authors.sh Executable file
View file

@ -0,0 +1,10 @@
#!/bin/sh
# save as i.e.: git-authors and set the executable flag
git ls-tree -r -z --name-only HEAD -- "${1}" \
| xargs -0 -n1 git blame --line-porcelain HEAD \
| grep "^author " \
| sort \
| uniq -c \
| sort -nr