verify-tag: Parse GPG configuration options.

Modify verify-tag to load relevant GPG variables from the git configuratio file. This allows git tag -v to use an alternative GPG binary in the same way that git tag -s does. Signed-off-by: Alex Zepeda <alex@inferiorhumanorgans.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Alex Zepeda committed Mar 8, 2012 at 12:07 UTC a2c25061aa2cfa2f60d092a5b7bc9c00c4beca90
1 file changed +9 -1
builtin/verify-tag.c
+9 -1
@@ -58,6 +58,14 @@ static int verify_tag(const char *name, int verbose)
58 return ret;
59 }
60
61 +static int git_verify_tag_config(const char *var, const char *value, void *cb)
62 +{
63 + int status = git_gpg_config(var, value, cb);
64 + if (status)
65 + return status;
66 + return git_default_config(var, value, cb);
67 +}
68 +
69 int cmd_verify_tag(int argc, const char **argv, const char *prefix)
70 {
71 int i = 1, verbose = 0, had_error = 0;
@@ -66,7 +74,7 @@ int cmd_verify_tag(int argc, const char **argv, const char *prefix)
74 OPT_END()
75 };
76
69 - git_config(git_default_config, NULL);
77 + git_config(git_verify_tag_config, NULL);
78
79 argc = parse_options(argc, argv, prefix, verify_tag_options,
80 verify_tag_usage, PARSE_OPT_KEEP_ARGV0);