Fixes sorting issues with annotated and lightweight tags.

This commit is contained in:
Matt Colyer 2012-02-29 17:25:47 -08:00
parent e94e18aee5
commit 226f58ab6f

View file

@ -6,7 +6,7 @@ DATE=`date +'%Y-%m-%d'`
HEAD="\nn.n.n / $DATE \n==================\n"
if test "$1" = "--list"; then
version=`git for-each-ref refs/tags --sort=-authordate --format='%(refname)' \
version=`git for-each-ref refs/tags --sort="-*authordate" --format='%(refname)' \
--count=1 | sed 's/^refs\/tags\///'`
if test -z "$version"; then
git log --pretty="format: * %s"