Here's a script from @maxtaco to count the number of files in a git commit:
#!/bin/sh

N=`git diff --stat HEAD^ HEAD | perl -ne ' { if ( /(\d+) files changed/) { print "$1\n"; exit (0); }  } ' `

if [ "$N" != "" ]
then
       echo -n "Post N=$N to stathat...."
       wget --quiet -O- --post-data "email=your@email.com&stat=git commit files changed&count=$N" http://api.stathat.com/ez
       echo
fi
Put it in .git/hooks/post-commit.

No comments yet...