summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 6802563)
raw | patch | inline | side by side (parent: 6802563)
author | Junio C Hamano <junkio@cox.net> | |
Sat, 20 Jan 2007 18:47:41 +0000 (10:47 -0800) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Sun, 21 Jan 2007 03:19:12 +0000 (19:19 -0800) |
Signed-off-by: Junio C Hamano <junkio@cox.net>
Documentation/git-tag.txt | patch | blob | history | |
git-tag.sh | patch | blob | history |
index 8a71ab37dff0ba481666ee05f13f4b9aa0ba8c2b..13c7aefbf332124c5282a9a8532c7c9f8e0564f1 100644 (file)
NAME
----
-git-tag - Create or verify a tag object signed with GPG
+git-tag - Create, list, delete or verify a tag object signed with GPG
SYNOPSIS
--------
[verse]
-'git-tag' [-a | -s | -u <key-id>] [-f | -d | -v] [-m <msg> | -F <file>]
- <name> [<head>]
+'git-tag' [-a | -s | -u <key-id>] [-f | -v] [-m <msg> | -F <file>] <name> [<head>]
+'git-tag' -d <name>...
'git-tag' -l [<pattern>]
DESCRIPTION
Replace an existing tag with the given name (instead of failing)
-d::
- Delete an existing tag with the given name
+ Delete existing tags with the given names.
-v::
Verify the gpg signature of given the tag
diff --git a/git-tag.sh b/git-tag.sh
index ecb9100e4b3a7d1ce0227fde447f675376aaf29a..94499c9b367800249e74a0e891dd14eb968f8857 100755 (executable)
--- a/git-tag.sh
+++ b/git-tag.sh
;;
-d)
shift
- tag_name="$1"
- tag=$(git-show-ref --verify --hash -- "refs/tags/$tag_name") ||
- die "Seriously, what tag are you talking about?"
- git-update-ref -m 'tag: delete' -d "refs/tags/$tag_name" "$tag" &&
- echo "Deleted tag $tag_name."
- exit $?
+ had_error=0
+ for tag
+ do
+ cur=$(git-show-ref --verify --hash -- "refs/tags/$tag") || {
+ echo >&2 "Seriously, what tag are you talking about?"
+ had_error=1
+ continue
+ }
+ git-update-ref -m 'tag: delete' -d "refs/tags/$tag" "$cur" || {
+ had_error=1
+ continue
+ }
+ echo "Deleted tag $tag."
+ done
+ exit $had_error
;;
-v)
shift