2005-06-27 04:38:47 +04:00
|
|
|
#!/bin/sh
|
2005-11-28 10:19:58 +03:00
|
|
|
|
|
|
|
GIT_DIR=`git-rev-parse --git-dir` || exit $?
|
2005-06-27 04:38:47 +04:00
|
|
|
|
2005-11-28 10:33:54 +03:00
|
|
|
die () {
|
|
|
|
echo >&2 "$*"
|
|
|
|
exit 1
|
|
|
|
}
|
|
|
|
|
2005-10-10 03:50:34 +04:00
|
|
|
type="$(git-cat-file -t "$1" 2>/dev/null)" ||
|
|
|
|
die "$1: no such object."
|
2005-06-27 04:38:47 +04:00
|
|
|
|
2005-10-10 03:50:34 +04:00
|
|
|
test "$type" = tag ||
|
|
|
|
die "$1: cannot verify a non-tag object of type $type."
|
|
|
|
|
2005-11-28 10:19:58 +03: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"
|
|
|
|
|