applymbox: brown paper bag fix.
[gitweb.git] / templates / hooks--update
index 4af2fe8d9517f3be1a6cb526a62d12e1f2c70915..8f6c4fea2429cef0da4748f8871ceaed94b432cc 100644 (file)
@@ -64,7 +64,7 @@ case "$refname","$newrev_type" in
                # 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
@@ -210,7 +210,7 @@ case "$refname_type" in
                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