Show a list of the top authors of all the files in a folder, according to `git blame`.
# Use
bash git-top-authors.sh path/to/folder
# Output
593 Author 1
352 Author 2
168 Author 3
76 Author 4
#!/bin/bash
DIR="$1"
IFS=$'\n'
cd "$DIR"
LIST=""
for i in $(find . -iname "*.scss"); do
LIST="`git blame --line-porcelain "$i" | grep 'author ' | sed "s,author,," | tr -d ' '`
$LIST"
done
echo "$LIST" | sort | uniq -ic | sort -nr
unset IFS