1#!/bin/sh
23
USAGE='<tag>'
4SUBDIRECTORY_OK='Yes'
5. git-sh-setup
67
if [ "$#" != "1" ]
8then
9usage
10fi
1112
type="$(git-cat-file -t "$1" 2>/dev/null)" ||
13die "$1: no such object."
1415
test "$type" = tag ||
16die "$1: cannot verify a non-tag object of type $type."
1718
git-cat-file tag "$1" >"$GIT_DIR/.tmp-vtag" || exit 1
19cat "$GIT_DIR/.tmp-vtag" |
20sed '/-----BEGIN PGP/Q' |
21gpg --verify "$GIT_DIR/.tmp-vtag" - || exit 1
22rm -f "$GIT_DIR/.tmp-vtag"
23