#! /bin/sh
+COUNT_OBJ_PRG="git count-objects -v | grep ^count: | cut -c 8-"
+export COUNT_OBJ_PRG
+
exec "`dirname \"$0\"`"/do-all \
- 'test "`ls -1 \"$g\"/objects 2>/dev/null | wc -l`" -gt 2 && echo "$d"'
+ 'cd "$d" && count_obj=`eval $COUNT_OBJ_PRG`; ' \
+ 'if [ "$d" != "$g" ]; then' \
+ 'for c in `eval git submodule foreach $COUNT_OBJ_PRG`;' \
+ 'do count_obj=`expr $count_obj + $c`; done; ' \
+ 'fi; ' \
+ 'test $count_obj -gt 1 && echo "$d"' \