tj.git-extras/bin/git-count
Alexander Krasnukhin 2c346d256a Update bit/git-count
Matching "):" in the end can match commit subjects by mistake i.e. if
commit subject ends with "):" too (e.g. linux project has one such
commit).

To avoid this and any similar problems print summary only (-s).
Restructure output to look exactly as it was before with awk.
2012-11-17 13:40:43 +01:00

9 lines
166 B
Bash
Executable file

#!/bin/sh
if test "$1" = "--all"; then
git shortlog -n -s $@ | awk '{print substr($0,index($0,$2)) " (" $1 ")"}'
echo
fi
echo total `git rev-list --count HEAD`