1#!/bin/sh
23
GIT_DIR=`git-rev-parse --git-dir` || exit $?
45
die () {
6echo >&2 "$*"
7exit 1
8}
910
type="$(git-cat-file -t "$1" 2>/dev/null)" ||
11die "$1: no such object."
1213
test "$type" = tag ||
14die "$1: cannot verify a non-tag object of type $type."
1516
git-cat-file tag "$1" >"$GIT_DIR/.tmp-vtag" || exit 1
17cat "$GIT_DIR/.tmp-vtag" |
18sed '/-----BEGIN PGP/Q' |
19gpg --verify "$GIT_DIR/.tmp-vtag" - || exit 1
20rm -f "$GIT_DIR/.tmp-vtag"
21