Browse Source

git-tag -d <tag>: delete tag <tag>

This adds option '-d' to git-tag.sh and documents it.

Signed-off-by: Kai Ruemmler <kai.ruemmler@gmx.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
maint
Kai Ruemmler 19 years ago committed by Junio C Hamano
parent
commit
61f81518a2
  1. 4
      Documentation/git-tag.txt
  2. 9
      git-tag.sh

4
Documentation/git-tag.txt

@ -8,7 +8,7 @@ git-tag - Create a tag object signed with GPG


SYNOPSIS SYNOPSIS
-------- --------
'git-tag' [-a | -s | -u <key-id>] [-f] [-m <msg>] <name> [<head>] 'git-tag' [-a | -s | -u <key-id>] [-f | -d] [-m <msg>] <name> [<head>]


DESCRIPTION DESCRIPTION
----------- -----------
@ -30,6 +30,8 @@ A GnuPG signed tag object will be created when `-s` or `-u
committer identity for the current user is used to find the committer identity for the current user is used to find the
GnuPG key for signing. GnuPG key for signing.


`-d <tag>` deletes the tag.



Author Author
------ ------

9
git-tag.sh

@ -4,7 +4,7 @@
. git-sh-setup || die "Not a git archive" . git-sh-setup || die "Not a git archive"


usage () { usage () {
echo >&2 "Usage: git-tag [-a | -s | -u <key-id>] [-f] [-m <msg>] <tagname> [<head>]" echo >&2 "Usage: git-tag [-a | -s | -u <key-id>] [-f | -d] [-m <msg>] <tagname> [<head>]"
exit 1 exit 1
} }


@ -37,6 +37,13 @@ do
shift shift
username="$1" username="$1"
;; ;;
-d)
shift
tag_name="$1"
rm "$GIT_DIR/refs/tags/$tag_name" && \
echo "Deleted tag $tag_name."
exit $?
;;
-*) -*)
usage usage
;; ;;

Loading…
Cancel
Save