Skip to content

Commit f336e71

Browse files
jaharkesLinus Torvalds
authored andcommitted
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
1 parent 27225f2 commit f336e71

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

git-verify-tag-script

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/bin/sh
2+
GIT_DIR=${GIT_DIR:-.git}
3+
4+
tag=$1
5+
[ -f "$GIT_DIR/refs/tags/$tag" ] && tag=$(cat "$GIT_DIR/refs/tags/$tag")
6+
7+
git-cat-file tag $tag > .tmp-vtag || exit 1
8+
cat .tmp-vtag | sed '/-----BEGIN PGP/Q' | gpg --verify .tmp-vtag -
9+
rm -f .tmp-vtag

0 commit comments

Comments
 (0)