Thread (21 messages) flat view 21 messages, 2 authors, 2016-10-20

Re: [PATCH v4 4/7] builtin/verify-tag: add --format to verify-tag

From: Jeff King <hidden>
Date: 2016-10-19 09:06:56

On Fri, Oct 07, 2016 at 05:07:18PM -0400, santiago@nyu.edu wrote:
quoted hunk ↗ jump to hunk
@@ -46,12 +50,17 @@ int cmd_verify_tag(int argc, const char **argv, const char *prefix)
 	if (verbose)
 		flags |= GPG_VERIFY_VERBOSE;
 
+	if (fmt_pretty) {
+		verify_ref_format(fmt_pretty);
+		flags |= GPG_VERIFY_QUIET;
+	}
I see why you would want to disable the normal output when there is a
custom format. But it seems a shame that the GPG information cannot be
retrieved as part of that format.

I think in the long run we'd want something like pretty.c's "%G"
placeholders for the ref-filter pretty-printer. But I think we are OK to
do this patch without it. It allows at least:

  tag=v2.0.0
  got=$(git verify-tag --format='%(tag)' "$tag") &&
  test "$tag" = "$got" ||
  echo >&2 "verification failed"

which is better than what we have now, and can be extended in the
future.

-Peff
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help