tj.git-extras/bin/git-count
Damien Tardy-Panis fae4c29870 count: remove usage of extra arguments for detailed display
When viewing detailed count information through the usage of the
--all argument, extra arguments would be also passed to the
git shortlog command (probably to be used as revisions list)
This behaviour was introduced in commit 7a60cd1.

Unfortunately the --all argument itself is passed along and results
in the counts of all refs to be displayed
This commit removed the usage of extra arguments and thus only
display the counts of the current branch
2016-09-12 13:46:25 +02:00

9 lines
173 B
Bash
Executable file

#!/usr/bin/env bash
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`