2005-06-27 00:38:47 +00:00
|
|
|
#!/bin/sh
|
2005-11-28 07:19:58 +00:00
|
|
|
|
2005-12-13 22:30:31 +00:00
|
|
|
USAGE='<tag>'
|
|
|
|
SUBDIRECTORY_OK='Yes'
|
|
|
|
. git-sh-setup
|
2005-06-27 00:38:47 +00:00
|
|
|
|
2005-12-13 22:30:31 +00:00
|
|
|
if [ "$#" != "1" ]
|
|
|
|
then
|
|
|
|
usage
|
|
|
|
fi
|
2005-11-28 07:33:54 +00:00
|
|
|
|
2005-10-09 23:50:34 +00:00
|
|
|
type="$(git-cat-file -t "$1" 2>/dev/null)" ||
|
|
|
|
die "$1: no such object."
|
2005-06-27 00:38:47 +00:00
|
|
|
|
2005-10-09 23:50:34 +00:00
|
|
|
test "$type" = tag ||
|
|
|
|
die "$1: cannot verify a non-tag object of type $type."
|
|
|
|
|
2005-11-28 07:19:58 +00:00
|
|
|
git-cat-file tag "$1" >"$GIT_DIR/.tmp-vtag" || exit 1
|
|
|
|
cat "$GIT_DIR/.tmp-vtag" |
|
|
|
|
sed '/-----BEGIN PGP/Q' |
|
|
|
|
gpg --verify "$GIT_DIR/.tmp-vtag" - || exit 1
|
|
|
|
rm -f "$GIT_DIR/.tmp-vtag"
|
|
|
|
|