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

Re: [PATCH 1/2] builtin/tag: do not omit -v gpg out for --format

From
Jeff King <peff@peff.net>
Date
May 9, 2019, 07:36 UTC
Message-ID
<20190509073644.GA24493@sigill.intra.peff.net>
In-Reply-To
<20190427202123.15380-2-santiago@nyu.edu>
On Sat, Apr 27, 2019 at 04:21:22PM -0400, santiago@nyu.edu wrote:
Show 6 quoted lines
> From: Santiago Torres <santiago@nyu.edu>
> 
> The current implementation of git tag -v omits the gpg output when the
> --format flag is passed. This may not be useful to users that want to
> see the gpg output *and* --format the output of the git tag -v. Instead,
> pass the default gpg interface output if --format is specified.
Yeah, I think this is the right thing to do.
Show 11 quoted lines
> @@ -110,10 +110,10 @@ static int verify_tag(const char *name, const char *ref,
>  {
>  	int flags;
>  	const struct ref_format *format = cb_data;
> -	flags = GPG_VERIFY_VERBOSE;
> +	flags = 0;
>  
> -	if (format->format)
> -		flags = GPG_VERIFY_OMIT_STATUS;
> +	if (!format->format)
> +		flags = GPG_VERIFY_VERBOSE;
So we're going to stop setting OMIT_STATUS ever, which makes sense.

It took me a minute to figure out here that the behavior for VERBOSE is not changed, because we _overwrite_ flags, rather than just setting a single bit. But that's definitely the right thing to do when there's a format (both before and after your patch).

So this looks good to me. I think we should probably cover it with a test in t7004.

-Peff
Previous: santiago@nyu.eduNext: Santiago Torres Arias
Message 3 of 7 in “tag verification: do not mute gpg output”
  1. 0/2 tag verification: do not mute gpg outputsantiago@nyu.edu, Apr 27, 2019
  2. 1/2 builtin/tag: do not omit -v gpg out for --formatsantiago@nyu.edu, Apr 27, 2019
  3. Jeff KingMay 9, 2019
  4. Santiago Torres AriasMay 9, 2019
  5. 2/2 builtin/verify-tag: do not omit gpg on --formatsantiago@nyu.edu, Apr 27, 2019
  6. Jeff KingMay 9, 2019
  7. Santiago Torres AriasMay 9, 2019

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.