tag -v: verify directly rather than exec-ing verify-tag
Instead of having tag -v fork to run verify-tag, use the gpg_verify_tag() function directly. Helped-by: Eric Sunshine <sunshine@sunshineco.com> Signed-off-by: Santiago Torres <santiago@nyu.edu> Reviewed-by: Eric Sunshine <sunshine@sunshineco.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Santiago Torres committed
Apr 22, 2016 at 10:52 UTC
bef234b09e5c3b2f63429fb49aff983f6f617f22
1 file changed
+1
-7
builtin/tag.c
+1
-7
@@ -104,13 +104,7 @@ static int delete_tag(const char *name, const char *ref,
104
static int verify_tag(const char *name, const char *ref,
105
const unsigned char *sha1)
106
{
107
- const char *argv_verify_tag[] = {"verify-tag",
108
- "-v", "SHA1_HEX", NULL};
109
- argv_verify_tag[2] = sha1_to_hex(sha1);
110
-
111
- if (run_command_v_opt(argv_verify_tag, RUN_GIT_CMD))
112
- return error(_("could not verify the tag '%s'"), name);
113
- return 0;
107
+ return gpg_verify_tag(sha1, name, GPG_VERIFY_VERBOSE);
108
}
109
110
static int do_sign(struct strbuf *buffer)