1#!/bin/sh23USAGE='<tag>'4SUBDIRECTORY_OK='Yes'5. git-sh-setup67verbose=8while case $# in 0) break;; esac9do10case "$1" in11-v|--v|--ve|--ver|--verb|--verbo|--verbos|--verbose)12verbose=t ;;13*)14break ;;15esac16shift17done1819if [ "$#" != "1" ]20then21usage22fi2324type="$(git-cat-file -t "$1" 2>/dev/null)" ||25die "$1: no such object."2627test "$type" = tag ||28die "$1: cannot verify a non-tag object of type $type."2930case "$verbose" in31t)32git-cat-file -p "$1" |33sed -n -e '/^-----BEGIN PGP SIGNATURE-----/q' -e p34;;35esac3637git-cat-file tag "$1" >"$GIT_DIR/.tmp-vtag" || exit 138cat "$GIT_DIR/.tmp-vtag" |39sed '/-----BEGIN PGP/Q' |40gpg --verify "$GIT_DIR/.tmp-vtag" - || exit 141rm -f "$GIT_DIR/.tmp-vtag"42