summaryrefslogtreecommitdiff
path: root/git-verify-tag.sh
diff options
context:
space:
mode:
authorLibravatar Shawn O. Pearce <spearce@spearce.org>2007-06-30 02:42:47 -0400
committerLibravatar Junio C Hamano <gitster@pobox.com>2007-06-30 00:00:30 -0700
commitbfc04bb9b847912ee41a21fc23110962851878b2 (patch)
tree4f55608848764038be2a8e6e454a66d73448074b /git-verify-tag.sh
parentUpdate draft Release Notes for 1.5.3 (diff)
downloadtgif-bfc04bb9b847912ee41a21fc23110962851878b2.tar.xz
Correct usages of sed in git-tag for Mac OS X
Both `git-tag -l` and `git tag -v` fail on Mac OS X due to their non-standard uses of sed. Actually `git tag -v` fails because the underlying git-tag-verify uses a non-standard sed command. We now stick to only standard sed, which does make our sed scripts slightly more complicated, but we can actually list tags with more than 0 lines of additional context and we can verify signed tags with gpg. These major Git functions are much more important than saving two or three lines of a simple sed script. Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-verify-tag.sh')
-rwxr-xr-xgit-verify-tag.sh7
1 files changed, 4 insertions, 3 deletions
diff --git a/git-verify-tag.sh b/git-verify-tag.sh
index f2d5597dba..68858b694d 100755
--- a/git-verify-tag.sh
+++ b/git-verify-tag.sh
@@ -37,8 +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"