tj.git-extras/bin/git-effort
TJ Holowaychuk c2bd285ef8 ws
2012-02-08 07:59:57 -08:00

30 lines
519 B
Bash
Executable file

#!/bin/sh
files=`git ls-files`
above='0'
if test "$1" = "--above"; then
above=$2
fi
echo
echo " file commits"
echo
for file in $files; do
commits=`git log --oneline $file | wc -l`
color='90'
if test $commits -le $above; then
continue
fi
test $commits -gt 10 && color='33'
test $commits -gt 25 && color='93'
test $commits -gt 50 && color='32'
test $commits -gt 100 && color='92'
printf " \033[${color}m%-45s %d\033[0m\n" $file $commits
done
echo