Skip to content

Commit a2c2506

Browse files
inferiorhumanorgansgitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 828ea97 commit a2c2506

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

builtin/verify-tag.c

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,14 @@ static int verify_tag(const char *name, int verbose)
5858
return ret;
5959
}
6060

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+
6169
int cmd_verify_tag(int argc, const char **argv, const char *prefix)
6270
{
6371
int i = 1, verbose = 0, had_error = 0;
@@ -66,7 +74,7 @@ int cmd_verify_tag(int argc, const char **argv, const char *prefix)
6674
OPT_END()
6775
};
6876

69-
git_config(git_default_config, NULL);
77+
git_config(git_verify_tag_config, NULL);
7078

7179
argc = parse_options(argc, argv, prefix, verify_tag_options,
7280
verify_tag_usage, PARSE_OPT_KEEP_ARGV0);

0 commit comments

Comments
 (0)