git-stash: don't complain when listing in a repo with no stash
[gitweb.git] / git-verify-tag.sh
index 8db7dd0b7d371cfeec84e70ff2a51ccf53a994e7..68858b694df5022530d38d38057331d7487fc6f0 100755 (executable)
@@ -37,9 +37,9 @@ 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"
-