From: Kai Ruemmler Date: Tue, 8 Nov 2005 10:44:33 +0000 (+0100) Subject: git-tag -d : delete tag X-Git-Tag: v0.99.9g^2~11 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=61f81518a2372dd78fa03da2b3d62173c3268ee7;p=git.git git-tag -d : delete tag This adds option '-d' to git-tag.sh and documents it. Signed-off-by: Kai Ruemmler Signed-off-by: Junio C Hamano --- diff --git a/Documentation/git-tag.txt b/Documentation/git-tag.txt index 3984812ce..95de436c1 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 ] [-f] [-m ] [] +'git-tag' [-a | -s | -u ] [-f | -d] [-m ] [] 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 ` deletes the tag. + Author ------ diff --git a/git-tag.sh b/git-tag.sh index 6130904a9..137594530 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 ] [-f] [-m ] []" + echo >&2 "Usage: git-tag [-a | -s | -u ] [-f | -d] [-m ] []" 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 ;;