X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=git-tag.sh;h=16efc5b70ac7ea4f0770530845e35091e71feab6;hb=562051809589574576971c53c23aad93f8c395d9;hp=6130904a94ddeffb15b1b10ded8336c67112c12e;hpb=52963a7a3fad7f3da7b4ec49824d92338a2ab668;p=git.git diff --git a/git-tag.sh b/git-tag.sh index 6130904a..16efc5b7 100755 --- a/git-tag.sh +++ b/git-tag.sh @@ -1,10 +1,10 @@ #!/bin/sh # Copyright (c) 2005 Linus Torvalds -. git-sh-setup || die "Not a git archive" +. git-sh-setup 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 ;;