diff options
-rwxr-xr-x | git-tag.sh | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/git-tag.sh b/git-tag.sh index 2bde3c05f..6463b314c 100755 --- a/git-tag.sh +++ b/git-tag.sh @@ -47,8 +47,10 @@ do -d) shift tag_name="$1" - rm "$GIT_DIR/refs/tags/$tag_name" && \ - echo "Deleted tag $tag_name." + tag=$(git-show-ref --verify --hash -- "refs/tags/$tag_name") || + die "Seriously, what tag are you talking about?" + git-update-ref -m 'tag: delete' -d "refs/tags/$tag_name" "$tag" && + echo "Deleted tag $tag_name." exit $? ;; -*) |