# un-annotated tag
refname_type="tag"
short_refname=${refname##refs/tags/}
- if [ $allowunannotated != "true" ]; then
+ if [ "$allowunannotated" != "true" ]; then
echo "*** The un-annotated tag, $short_refname is not allowed in this repository" >&2
echo "*** Use 'git tag [ -a | -s ]' for tags you want to propagate." >&2
exit 1
fi
# If this tag succeeds another, then show which tag it replaces
- prevtag=$(git describe $newrev^ 2>/dev/null | sed 's/-g.*//')
+ prevtag=$(git describe --abbrev=0 $newrev^ 2>/dev/null)
if [ -n "$prevtag" ]; then
echo " replaces $prevtag"
fi