2005-06-27 02:38:47 +02:00
|
|
|
#!/bin/sh
|
2005-11-28 08:19:58 +01:00
|
|
|
|
2005-12-13 23:30:31 +01:00
|
|
|
USAGE='<tag>'
|
|
|
|
SUBDIRECTORY_OK='Yes'
|
|
|
|
. git-sh-setup
|
2005-06-27 02:38:47 +02:00
|
|
|
|
2005-12-13 23:30:31 +01:00
|
|
|
if [ "$#" != "1" ]
|
|
|
|
then
|
|
|
|
usage
|
|
|
|
fi
|
2005-11-28 08:33:54 +01:00
|
|
|
|
2005-10-10 01:50:34 +02:00
|
|
|
type="$(git-cat-file -t "$1" 2>/dev/null)" ||
|
|
|
|
die "$1: no such object."
|
2005-06-27 02:38:47 +02:00
|
|
|
|
2005-10-10 01:50:34 +02:00
|
|
|
test "$type" = tag ||
|
|
|
|
die "$1: cannot verify a non-tag object of type $type."
|
|
|
|
|
2005-11-28 08:19:58 +01: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"
|
|
|
|
|