Last active
August 29, 2015 14:21
-
-
Save rom1504/9f9bcc843343159ed50a 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
if [[ $# -ne 2 ]] | |
then | |
echo "usage : $0 <outputFile> <repo>" | |
exit 1 | |
fi | |
outputFile=$1 | |
repo=$2 | |
rm $outputFile | |
cd $repo | |
git checkout master | |
for i in $(git rev-list HEAD) | |
do | |
git checkout $i | |
fileList=`find -name "*.js"` | |
if [ "$fileList" = "" ] | |
then | |
lineCount=0 | |
fileCount=0 | |
else | |
lineCount=`cat $fileList | wc -l` | |
fileCount=`echo "$fileList" |wc -l` | |
fi | |
echo -e "$i\t$lineCount\t$fileCount" >> $outputFile | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment