git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v5 3/7] tag: add format specifier to gpg_verify_tag

From
Jeff King <peff@peff.net>
Date
Jan 17, 2017, 15:30 UTC
Message-ID
<20170117153019.gujiruwghkwfklgv@sigill.intra.peff.net>
In-Reply-To
<20170117152455.k6zkeclsyawzpl2n@sigill.intra.peff.net>
On Tue, Jan 17, 2017 at 10:24:55AM -0500, Jeff King wrote:
Show 23 quoted lines
> On Sun, Jan 15, 2017 at 01:47:01PM -0500, santiago@nyu.edu wrote:
> 
> > From: Lukas Puehringer <luk.puehringer@gmail.com>
> > 
> > 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
Previous: Jeff KingNext: Santiago Torres
Message 14 of 21 in “Add --format to tag verification”
  1. 0/7 Add --format to tag verificationsantiago@nyu.edu, Jan 15, 2017
  2. 1/7 gpg-interface, tag: add GPG_VERIFY_QUIET flagsantiago@nyu.edu, Jan 15, 2017
  3. 2/7 ref-filter: add function to print single ref_array_itemsantiago@nyu.edu, Jan 15, 2017
  4. 7/7 t/t7004-tag: Add --format specifier testssantiago@nyu.edu, Jan 15, 2017
  5. Jeff KingJan 17, 2017
  6. 6/7 t/t7030-verify-tag: Add --format specifier testssantiago@nyu.edu, Jan 15, 2017
  7. 5/7 builtin/tag: add --format argument for tag -vsantiago@nyu.edu, Jan 15, 2017
  8. Jeff KingJan 17, 2017
  9. Santiago TorresJan 17, 2017
  10. Jeff KingJan 17, 2017
  11. Santiago TorresJan 17, 2017
  12. 3/7 tag: add format specifier to gpg_verify_tagsantiago@nyu.edu, Jan 15, 2017
  13. Jeff KingJan 17, 2017
  14. Jeff KingJan 17, 2017
  15. Santiago TorresJan 17, 2017
  16. Jeff KingJan 17, 2017
  17. Jeff KingJan 17, 2017
  18. Santiago TorresJan 17, 2017
  19. Jeff KingJan 17, 2017
  20. 4/7 builtin/verify-tag: add --format to verify-tagsantiago@nyu.edu, Jan 15, 2017
  21. Jeff KingJan 17, 2017

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.