git-verify-tag.shon commit [PATCH] allow merging any committish (9954f5b)
   1#!/bin/sh
   2
   3GIT_DIR=`git-rev-parse --git-dir` || exit $?
   4
   5die () {
   6    echo >&2 "$*"
   7    exit 1
   8}
   9
  10type="$(git-cat-file -t "$1" 2>/dev/null)" ||
  11        die "$1: no such object."
  12
  13test "$type" = tag ||
  14        die "$1: cannot verify a non-tag object of type $type."
  15
  16git-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