Skip to content

Commit

Permalink
git-tag -d <tag>: delete tag <tag>
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Kai Ruemmler authored and Junio C Hamano committed Nov 8, 2005
1 parent 23fc63b commit 61f8151
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
4 changes: 3 additions & 1 deletion Documentation/git-tag.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
-----------
Expand All @@ -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
------
Expand Down
9 changes: 8 additions & 1 deletion git-tag.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down Expand Up @@ -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
;;
Expand Down

0 comments on commit 61f8151

Please sign in to comment.