> However, I don't think this patch is quite right, as it causes us to > dump the whole tag contents to stdout, as well. E.g.: > > [before] > $ git tag -v --format='foo %(tag)' v2.21.0 > foo v2.21.0 > > [after] > $ git tag -v --format='foo %(tag)' v2.21.0 > object 8104ec994ea3849a968b4667d072fedd1e688642 > type commit > tag v2.21.0 > tagger Junio C Hamano <gitster@xxxxxxxxx> 1551023739 -0800 > > Git 2.21 > gpg: Signature made Sun Feb 24 10:55:39 2019 EST > gpg: using RSA key E1F036B1FEE7221FC778ECEFB0B5E88696AFE6CB > gpg: Good signature from "Junio C Hamano <gitster@xxxxxxxxx>" [full] > gpg: aka "Junio C Hamano <jch@xxxxxxxxxx>" [full] > gpg: aka "Junio C Hamano <junio@xxxxxxxxx>" [full] > foo v2.21.0 > > I think "git verify-tag" would need similar treatment, too: > > $ git verify-tag v2.21.0 > gpg: Signature made Sun Feb 24 10:55:39 2019 EST > gpg: using RSA key E1F036B1FEE7221FC778ECEFB0B5E88696AFE6CB > gpg: Good signature from "Junio C Hamano <gitster@xxxxxxxxx>" [full] > gpg: aka "Junio C Hamano <jch@xxxxxxxxxx>" [full] > gpg: aka "Junio C Hamano <junio@xxxxxxxxx>" [full] > > $ git verify-tag --format='foo %(tag)' v2.21.0 > foo v2.21.0 > Ah, let me look into these issues. I'm almost sure I also need to review the test suite and adapt it to this behavior. > In some ways I'm less concerned about verify-tag, though, because the > point is that it should be scriptable. And scraping gpg's stderr is not > ideal there. We should be parsing --status-fd ourselves and making the > result available via format specifier, similar to the way "log > --format=%G?" works. I think that would be great, as we could make it simpler for verifiers to parse gpg output. > So I think ultimately that's the direction we want to go, but I think > in the meantime restoring the gpg output to stderr especially for the > porcelain "git tag -v" makes sense for human eyes. Great! let me re-roll and make a more formal take on this. Thanks! -Santiago
Attachment:
signature.asc
Description: PGP signature