summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 8228326)
raw | patch | inline | side by side (parent: 8228326)
author | Eric W. Biederman <ebiederm@xmission.com> | |
Sat, 16 Jul 2005 20:18:40 +0000 (14:18 -0600) | ||
committer | Linus Torvalds <torvalds@g5.osdl.org> | |
Sat, 23 Jul 2005 00:48:45 +0000 (17:48 -0700) |
- Use git-rev-parse to allow sha1 tags references
- When the tag does not verify set an appropriate exit status
- Use git-sh-setup-script to verify the .git directory
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
- When the tag does not verify set an appropriate exit status
- Use git-sh-setup-script to verify the .git directory
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
git-verify-tag-script | patch | blob | history |
diff --git a/git-verify-tag-script b/git-verify-tag-script
index c4992118ecb607f23e5b328cc343ed6df385c0f9..6eb650be7a2c0449b3d6bad0a457b085db4cbe09 100755 (executable)
--- a/git-verify-tag-script
+++ b/git-verify-tag-script
#!/bin/sh
-GIT_DIR=${GIT_DIR:-.git}
+. git-sh-setup-script || die "Not a git archive"
-tag=$1
-[ -f "$GIT_DIR/refs/tags/$tag" ] && tag=$(cat "$GIT_DIR/refs/tags/$tag")
+tag=$(git-rev-parse $1) || exit 1
git-cat-file tag $tag > .tmp-vtag || exit 1
-cat .tmp-vtag | sed '/-----BEGIN PGP/Q' | gpg --verify .tmp-vtag -
+cat .tmp-vtag | sed '/-----BEGIN PGP/Q' | gpg --verify .tmp-vtag - || exit 1
rm -f .tmp-vtag