2005-06-27 02:38:47 +02:00
|
|
|
#!/bin/sh
|
2005-11-28 08:19:58 +01:00
|
|
|
|
|
|
|
GIT_DIR=`git-rev-parse --git-dir` || exit $?
|
2005-06-27 02:38:47 +02: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"
|
|
|
|
|