Re: [PATCH] hooks/update: Add a hooks.denyunsignedtags option
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Dec 21, 2015, 18:52 UTC
- Message-ID
- <xmqqpoxzfxdb.fsf@gitster.mtv.corp.google.com>
- In-Reply-To
- <xmqq37uvhdpw.fsf@gitster.mtv.corp.google.com>
Junio C Hamano <gitster@pobox.com> writes:
Show 19 quoted lines
> Use of "cat-file -p" is a bad manner in scripts, as we reserve the > right to change what "-p" output looks like purely on human > usability. "cat-file tag", perhaps? > > Also, > > $ git grep ' PGP ' > > in our source tells me that we use a bit tighter pattern even when > we are casually trying to see if the thing looks like a PGP signed > payload. > > if test "$allowunsigned" = "true" || > git cat-file "$newrev" | > grep -q '^-----BEGIN PGP SIGNATURE-----$' > then > ... > > or something?
I think an intelligent reader would have understood what I meant, but the 'cat-file' in the above needs to say what type of thing it is asking to dump, i.e.
if test "$allowunsigned" = "true" ||
git cat-file tag "$newrev" |
grep -q '^-----BEGIN PGP SIGNATURE-----$'
thenSorry for the noise.