summaryrefslogtreecommitdiff
path: root/git-verify-tag.sh
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <junkio@cox.net>2007-01-03 12:34:20 -0800
committerLibravatar Junio C Hamano <junkio@cox.net>2007-01-03 12:34:20 -0800
commit60c0f8462fefed22fc8fb9c4e529665ed8204536 (patch)
treebf0b90a7f4f7fa4fdd001ab50bf5116abce10b08 /git-verify-tag.sh
parentgit-tag: add flag to verify a tag (diff)
downloadtgif-60c0f8462fefed22fc8fb9c4e529665ed8204536.tar.xz
git-verify-tag: make sure we remove temporary file.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'git-verify-tag.sh')
-rwxr-xr-xgit-verify-tag.sh3
1 files changed, 3 insertions, 0 deletions
diff --git a/git-verify-tag.sh b/git-verify-tag.sh
index 36f171b302..8db7dd0b7d 100755
--- a/git-verify-tag.sh
+++ b/git-verify-tag.sh
@@ -34,7 +34,10 @@ t)
;;
esac
+trap 'rm -f "$GIT_DIR/.tmp-vtag"' 0
+
git-cat-file tag "$1" >"$GIT_DIR/.tmp-vtag" || exit 1
+
cat "$GIT_DIR/.tmp-vtag" |
sed '/-----BEGIN PGP/Q' |
gpg --verify "$GIT_DIR/.tmp-vtag" - || exit 1