Skip to content
Snippets Groups Projects
Commit a2c25061 authored by Alex Zepeda's avatar Alex Zepeda Committed by Junio C Hamano
Browse files

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: default avatarAlex Zepeda <alex@inferiorhumanorgans.com>
Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
parent 828ea97d
No related branches found
No related tags found
No related merge requests found
...@@ -58,6 +58,14 @@ static int verify_tag(const char *name, int verbose) ...@@ -58,6 +58,14 @@ static int verify_tag(const char *name, int verbose)
return ret; return ret;
} }
static int git_verify_tag_config(const char *var, const char *value, void *cb)
{
int status = git_gpg_config(var, value, cb);
if (status)
return status;
return git_default_config(var, value, cb);
}
int cmd_verify_tag(int argc, const char **argv, const char *prefix) int cmd_verify_tag(int argc, const char **argv, const char *prefix)
{ {
int i = 1, verbose = 0, had_error = 0; int i = 1, verbose = 0, had_error = 0;
...@@ -66,7 +74,7 @@ int cmd_verify_tag(int argc, const char **argv, const char *prefix) ...@@ -66,7 +74,7 @@ int cmd_verify_tag(int argc, const char **argv, const char *prefix)
OPT_END() OPT_END()
}; };
git_config(git_default_config, NULL); git_config(git_verify_tag_config, NULL);
argc = parse_options(argc, argv, prefix, verify_tag_options, argc = parse_options(argc, argv, prefix, verify_tag_options,
verify_tag_usage, PARSE_OPT_KEEP_ARGV0); verify_tag_usage, PARSE_OPT_KEEP_ARGV0);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment