git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Jeff King <peff@peff.net>
To: santiago@nyu.edu
Cc: git@vger.kernel.org, gitster@pobox.com, sunshine@sunshineco.com,
	walters@verbum.org
Subject: Re: [PATCH 1/2] builtin/tag: do not omit -v gpg out for --format
Date: Thu, 9 May 2019 03:36:44 -0400	[thread overview]
Message-ID: <20190509073644.GA24493@sigill.intra.peff.net> (raw)
In-Reply-To: <20190427202123.15380-2-santiago@nyu.edu>

On Sat, Apr 27, 2019 at 04:21:22PM -0400, santiago@nyu.edu wrote:

> 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.

> @@ -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

  reply	other threads:[~2019-05-09  7:36 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-27 20:21 [PATCH 0/2] tag verification: do not mute gpg output santiago
2019-04-27 20:21 ` [PATCH 1/2] builtin/tag: do not omit -v gpg out for --format santiago
2019-05-09  7:36   ` Jeff King [this message]
2019-05-09 17:36     ` Santiago Torres Arias
2019-04-27 20:21 ` [PATCH 2/2] builtin/verify-tag: do not omit gpg on --format santiago
2019-05-09  7:44   ` Jeff King
2019-05-09 17:40     ` Santiago Torres Arias

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190509073644.GA24493@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=santiago@nyu.edu \
    --cc=sunshine@sunshineco.com \
    --cc=walters@verbum.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).