diff options
author | Junio C Hamano <junkio@cox.net> | 2006-03-02 01:43:19 +0100 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2006-03-02 02:06:20 +0100 |
commit | a0f15fa502d4451a1d0041a431f43ff5519536dd (patch) | |
tree | ad606c2ff5a67aad86f8e43fb43632cea77ad416 /git-verify-tag.sh | |
parent | Merge branch 'lt/fix-apply' into maint (diff) | |
download | git-a0f15fa502d4451a1d0041a431f43ff5519536dd.tar.xz git-a0f15fa502d4451a1d0041a431f43ff5519536dd.zip |
Pretty-print tagger dates.
We can show commit objects with human readable dates using
various --pretty options, but there was no way to do so with
tags. This introduces two such ways:
$ git-cat-file -p v1.2.3
shows the tag object with tagger dates in human readable format.
$ git-verify-tag --verbose v1.2.3
uses it to show the contents of the tag object as well as doing
GPG verification.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'git-verify-tag.sh')
-rwxr-xr-x | git-verify-tag.sh | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/git-verify-tag.sh b/git-verify-tag.sh index 726b1e706b..36f171b302 100755 --- a/git-verify-tag.sh +++ b/git-verify-tag.sh @@ -4,9 +4,21 @@ USAGE='<tag>' SUBDIRECTORY_OK='Yes' . git-sh-setup +verbose= +while case $# in 0) break;; esac +do + case "$1" in + -v|--v|--ve|--ver|--verb|--verbo|--verbos|--verbose) + verbose=t ;; + *) + break ;; + esac + shift +done + if [ "$#" != "1" ] then - usage + usage fi type="$(git-cat-file -t "$1" 2>/dev/null)" || @@ -15,6 +27,13 @@ type="$(git-cat-file -t "$1" 2>/dev/null)" || test "$type" = tag || die "$1: cannot verify a non-tag object of type $type." +case "$verbose" in +t) + git-cat-file -p "$1" | + sed -n -e '/^-----BEGIN PGP SIGNATURE-----/q' -e p + ;; +esac + git-cat-file tag "$1" >"$GIT_DIR/.tmp-vtag" || exit 1 cat "$GIT_DIR/.tmp-vtag" | sed '/-----BEGIN PGP/Q' | |