summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKai Ruemmler <kai.ruemmler@gmx.net>2005-11-08 10:44:33 (GMT)
committerJunio C Hamano <junkio@cox.net>2005-11-08 19:26:10 (GMT)
commit61f81518a2372dd78fa03da2b3d62173c3268ee7 (patch)
treef852fe1c0dc5fee6b7e21cbb2d9805b754c16e6e
parent23fc63bf8fb7c3627f78ca6743b4f3ae17a5df49 (diff)
downloadgit-61f81518a2372dd78fa03da2b3d62173c3268ee7.zip
git-61f81518a2372dd78fa03da2b3d62173c3268ee7.tar.gz
git-61f81518a2372dd78fa03da2b3d62173c3268ee7.tar.bz2
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>
-rw-r--r--Documentation/git-tag.txt4
-rwxr-xr-xgit-tag.sh9
2 files changed, 11 insertions, 2 deletions
diff --git a/Documentation/git-tag.txt b/Documentation/git-tag.txt
index 3984812..95de436 100644
--- a/Documentation/git-tag.txt
+++ b/Documentation/git-tag.txt
@@ -8,7 +8,7 @@ git-tag - Create a tag object signed with GPG
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
-----------
@@ -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
GnuPG key for signing.
+`-d <tag>` deletes the tag.
+
Author
------
diff --git a/git-tag.sh b/git-tag.sh
index 6130904..1375945 100755
--- a/git-tag.sh
+++ b/git-tag.sh
@@ -4,7 +4,7 @@
. 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
}
@@ -37,6 +37,13 @@ do
shift
username="$1"
;;
+ -d)
+ shift
+ tag_name="$1"
+ rm "$GIT_DIR/refs/tags/$tag_name" && \
+ echo "Deleted tag $tag_name."
+ exit $?
+ ;;
-*)
usage
;;