aboutsummaryrefslogtreecommitdiffstats
path: root/git-verify-tag-script
diff options
context:
space:
mode:
authorJan Harkes <jaharkes@cs.cmu.edu>2005-06-26 17:38:47 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-06-26 17:38:47 -0700
commitf336e71f86560df3503c1da1f68635a184af28a9 (patch)
tree361f7868df200f800295dac303970ef718029fbc /git-verify-tag-script
parent27225f2e87f26351a5def9738f7b1d025159aa93 (diff)
downloadgit-f336e71f86560df3503c1da1f68635a184af28a9.tar.gz
Add git-verify-tag script
Here is a script to simplify validating the gpg signature created by git-tag-script. Might be useful to add to the git tree so that people don't have to search for the right post in the git mailinglist archives
Diffstat (limited to 'git-verify-tag-script')
-rwxr-xr-xgit-verify-tag-script9
1 files changed, 9 insertions, 0 deletions
diff --git a/git-verify-tag-script b/git-verify-tag-script
new file mode 100755
index 0000000000..c4992118ec
--- /dev/null
+++ b/git-verify-tag-script
@@ -0,0 +1,9 @@
+#!/bin/sh
+GIT_DIR=${GIT_DIR:-.git}
+
+tag=$1
+[ -f "$GIT_DIR/refs/tags/$tag" ] && tag=$(cat "$GIT_DIR/refs/tags/$tag")
+
+git-cat-file tag $tag > .tmp-vtag || exit 1
+cat .tmp-vtag | sed '/-----BEGIN PGP/Q' | gpg --verify .tmp-vtag -
+rm -f .tmp-vtag