Created
March 15, 2016 01:22
-
-
Save dshimy/f6be22d61564adb349dc to your computer and use it in GitHub Desktop.
git stats
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/bash | |
IFS=$'\n' | |
names=`git log --no-merges --all --since="3 months ago" --format='%aN' | sort -u` | |
printf "%-20s %10s %10s %10s\n" "Name" "Chng Files" "Lns Insert" "Lns Delete" | |
printf "%-20s %10s %10s %10s\n" "--------------------" "----------" "----------" "----------" | |
for n in ${names}; do | |
gitstat=`git log --no-merges --all --shortstat --since="3 months ago" --author="${n}" | grep -E "fil(e|es) changed" | awk '{files+=$1; inserted+=$4; deleted+=$6} END {printf "%10s %10s %10s", files, inserted, deleted }'` | |
name=`printf "%-20s" ${n}` | |
echo "${name} ${gitstat}" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment