aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Zepeda <alex@inferiorhumanorgans.com>2012-03-08 12:07:20 -0800
committerJunio C Hamano <gitster@pobox.com>2012-03-08 14:03:07 -0800
commita2c25061aa2cfa2f60d092a5b7bc9c00c4beca90 (patch)
tree0bfec62612371ba544215faeafc959c41405c253
parent828ea97de486c1693d6e4f2c7347acb50235a85d (diff)
downloadgit-a2c25061aa2cfa2f60d092a5b7bc9c00c4beca90.tar.gz
git-a2c25061aa2cfa2f60d092a5b7bc9c00c4beca90.tar.xz
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>
-rw-r--r--builtin/verify-tag.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/builtin/verify-tag.c b/builtin/verify-tag.c
index 28c217433..986789f70 100644
--- a/builtin/verify-tag.c
+++ b/builtin/verify-tag.c
@@ -58,6 +58,14 @@ static int verify_tag(const char *name, int verbose)
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 i = 1, verbose = 0, had_error = 0;
@@ -66,7 +74,7 @@ int cmd_verify_tag(int argc, const char **argv, const char *prefix)
OPT_END()
};
- git_config(git_default_config, NULL);
+ git_config(git_verify_tag_config, NULL);
argc = parse_options(argc, argv, prefix, verify_tag_options,
verify_tag_usage, PARSE_OPT_KEEP_ARGV0);