Created
January 10, 2014 16:53
-
-
Save ke4qqq/8357973 to your computer and use it in GitHub Desktop.
LOC per committer per a year
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
declare -A map | |
while read line; do | |
if grep "^[a-zA-Z]" <<< "$line" > /dev/null; then | |
current="$line" | |
if [ -z "${map[$current]}" ]; then | |
map[$current]=0 | |
fi | |
elif grep "^[0-9]" <<<"$line" >/dev/null; then | |
for i in $(cut -f 1,2 <<< "$line"); do | |
map[$current]=$((map[$current] + $i)) | |
done | |
fi | |
done <<< "$(git log --numstat -w -b --no-merges --after={2013-01-01} --before={2013-12-31} --pretty="%aN")" | |
for i in "${!map[@]}"; do | |
echo -e "$i:${map[$i]}" | |
done | sort -nr -t ":" -k 2 | column -t -s ":" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment