diff options
author | Junio C Hamano <junkio@cox.net> | 2005-10-09 19:16:33 -0700 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2005-10-09 19:16:33 -0700 |
commit | d5b0c9ea178dab3599674ccff50645c0464b8c31 (patch) | |
tree | a35b27b04d18022ea4731941ea2a1bedce998092 /git-verify-tag.sh | |
parent | f8e2c54c9a17af3319e96db1d9e97ace36ae6831 (diff) | |
parent | fb8024b414b417d85ce215eba3dd23c188500c15 (diff) | |
download | git-d5b0c9ea178dab3599674ccff50645c0464b8c31.tar.gz git-d5b0c9ea178dab3599674ccff50645c0464b8c31.tar.xz |
Merge branch 'fixes'
with minor hand resolving on git-tag.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'git-verify-tag.sh')
-rwxr-xr-x | git-verify-tag.sh | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/git-verify-tag.sh b/git-verify-tag.sh index 156c75bb3..ed4c89396 100755 --- a/git-verify-tag.sh +++ b/git-verify-tag.sh @@ -1,8 +1,12 @@ #!/bin/sh . git-sh-setup || die "Not a git archive" -tag=$(git-rev-parse $1) || exit 1 +type="$(git-cat-file -t "$1" 2>/dev/null)" || + die "$1: no such object." -git-cat-file tag $tag > .tmp-vtag || exit 1 +test "$type" = tag || + die "$1: cannot verify a non-tag object of type $type." + +git-cat-file tag "$1" > .tmp-vtag || exit 1 cat .tmp-vtag | sed '/-----BEGIN PGP/Q' | gpg --verify .tmp-vtag - || exit 1 rm -f .tmp-vtag |