#!/bin/sh

names=false
if test "z$1" = "z--names"; then
   names=true
fi

format="%an: %s%n"
uniq=''
if test "$names" = true; then
   format="%an%n"
   uniq='-c'
fi

tmp=`mktemp`
start='2010-09-28'

git log --after=$start --pretty=format:"$format" 2>&1 > $tmp
for i in clone/*; do (cd $i 2>/dev/null && git log --after=$start --pretty=format:"$format"); done >> $tmp

eval sort $tmp | uniq $uniq | sort -n | nl
echo "$tmp"
rm -f $tmp
