On Tue, Jan 17, 2017 at 10:24:55AM -0500, Jeff King wrote: > On Sun, Jan 15, 2017 at 01:47:01PM -0500, santiago@xxxxxxx wrote: > > > From: Lukas Puehringer <luk.puehringer@xxxxxxxxx> > > > > Calling functions for gpg_verify_tag() may desire to print relevant > > information about the header for further verification. Add an optional > > format argument to print any desired information after GPG verification. > > Hrm. Maybe I am missing something, but what does: > > verify_and_format_tag(sha1, name, fmt, flags); > > get you over: > > gpg_verify_tag(sha1, name, flags); > pretty_print_ref(name, sha1, fmt); > > ? The latter seems much more flexible, and I do not see how the > verification step impacts the printing at all (or vice versa). > > I could understand it more if there were patches later in the series > that somehow used the format and verification results together. But I > didn't see that. Having read through the rest of the series, it looks like you'd sometimes have to do: int ret; ret = gpg_verify_tag(sha1, name, flags); pretty_print_ref(name, sha1, fmt); if (ret) ... do something ... and this function lets you do it in a single line. Still, I think I'd rather see it done as a wrapper than modifying gpg_verify_tag(). -Peff