tag -v: verify directly rather than exec-ing verify-tag
authorSantiago Torres <santiago@nyu.edu>
Fri, 22 Apr 2016 14:52:05 +0000 (10:52 -0400)
committerJunio C Hamano <gitster@pobox.com>
Fri, 22 Apr 2016 21:06:46 +0000 (14:06 -0700)
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>
builtin/tag.c
index 1705c9466546c7de52b12d3fbafbbe7b6d43cf4e..7b2918ef38c603b52a5e02d0e81d7e23abaa5560 100644 (file)
@@ -104,13 +104,7 @@ static int delete_tag(const char *name, const char *ref,
 static int verify_tag(const char *name, const char *ref,
                                const unsigned char *sha1)
 {
-       const char *argv_verify_tag[] = {"verify-tag",
-                                       "-v", "SHA1_HEX", NULL};
-       argv_verify_tag[2] = sha1_to_hex(sha1);
-
-       if (run_command_v_opt(argv_verify_tag, RUN_GIT_CMD))
-               return error(_("could not verify the tag '%s'"), name);
-       return 0;
+       return gpg_verify_tag(sha1, name, GPG_VERIFY_VERBOSE);
 }
 
 static int do_sign(struct strbuf *buffer)