Commits

Anonymous committed 61f8151

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>

Comments (0)

Files changed (2)

Documentation/git-tag.txt

 
 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
 -----------
 committer identity for the current user is used to find the
 GnuPG key for signing.
 
+`-d <tag>` deletes the tag.
+
 
 Author
 ------
 . git-sh-setup || die "Not a git archive"
 
 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
 }
 
 	shift
 	username="$1"
 	;;
+    -d)
+    	shift
+	tag_name="$1"
+	rm "$GIT_DIR/refs/tags/$tag_name" && \
+	        echo "Deleted tag $tag_name."
+	exit $?
+	;;
     -*)
         usage
 	;;