mirror of
https://github.com/tj/git-extras.git
synced 2026-09-10 07:26:17 -04:00
Revert "Revert "Make sure to get the last chronological tag, instead of relying on the bogus git tag sorting.""
This reverts commit f659f34375.
This commit is contained in:
parent
f659f34375
commit
3315c8e19a
|
|
@ -6,7 +6,8 @@ DATE=`date +'%Y-%m-%d'`
|
|||
HEAD="\nn.n.n / $DATE \n==================\n"
|
||||
|
||||
if test "$1" = "--list"; then
|
||||
version=`git tag | tail -n 1`
|
||||
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"
|
||||
else
|
||||
|
|
@ -20,4 +21,4 @@ else
|
|||
if [ -f $CHANGELOG ]; then cat $CHANGELOG >> $tmp; fi
|
||||
mv $tmp $CHANGELOG
|
||||
test -n "$EDITOR" && $EDITOR $CHANGELOG
|
||||
fi
|
||||
fi
|
||||
|
|
|
|||
Loading…
Reference in a new issue