Browse Source

Use git-update-ref to delete a tag instead of rm()ing the ref file.

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
maint
Christian Couder 19 years ago committed by Junio C Hamano
parent
commit
d3d0013c59
  1. 4
      git-tag.sh

4
git-tag.sh

@ -47,7 +47,9 @@ do @@ -47,7 +47,9 @@ do
-d)
shift
tag_name="$1"
rm "$GIT_DIR/refs/tags/$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 $?
;;

Loading…
Cancel
Save