From: Eric W. Biederman Date: Sat, 16 Jul 2005 20:18:40 +0000 (-0600) Subject: [PATCH] Cleanup: git-verify-tag-script X-Git-Tag: v0.99.2~36 X-Git-Url: https://git.octo.it/?p=git.git;a=commitdiff_plain;h=62b532b080d56e02d8f486e801110456ab0bb380 [PATCH] Cleanup: git-verify-tag-script - 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 Signed-off-by: Junio C Hamano Signed-off-by: Linus Torvalds --- diff --git a/git-verify-tag-script b/git-verify-tag-script index c4992118..6eb650be 100755 --- a/git-verify-tag-script +++ b/git-verify-tag-script @@ -1,9 +1,8 @@ #!/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