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>
This commit is contained in:
parent
26a063a10b
commit
d3d0013c59
@ -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 $?
|
||||
;;
|
||||
-*)
|
||||
|
Loading…
Reference in New Issue
Block a user