git-stash: don't complain when listing in a repo with no stash
[gitweb.git] / git-verify-tag.sh
index 36f171b3028a3460c1c51f9c1f5747a9a0d2d850..68858b694df5022530d38d38057331d7487fc6f0 100755 (executable)
@@ -34,9 +34,12 @@ 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' |
+sed -n -e '
+       /^-----BEGIN PGP SIGNATURE-----$/q
+       p
+' <"$GIT_DIR/.tmp-vtag" |
 gpg --verify "$GIT_DIR/.tmp-vtag" - || exit 1
 rm -f "$GIT_DIR/.tmp-vtag"
-