git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] verify-tag: Parse GPG configuration options.
@ 2012-03-08 20:07 Alex Zepeda
  2012-03-08 22:01 ` Junio C Hamano
  0 siblings, 1 reply; 2+ messages in thread
From: Alex Zepeda @ 2012-03-08 20:07 UTC (permalink / raw)
  To: git, gitster

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>
---
 builtin/verify-tag.c |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)

diff --git a/builtin/verify-tag.c b/builtin/verify-tag.c
index 28c2174..986789f 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);
-- 
1.7.9.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] verify-tag: Parse GPG configuration options.
  2012-03-08 20:07 [PATCH] verify-tag: Parse GPG configuration options Alex Zepeda
@ 2012-03-08 22:01 ` Junio C Hamano
  0 siblings, 0 replies; 2+ messages in thread
From: Junio C Hamano @ 2012-03-08 22:01 UTC (permalink / raw)
  To: Alex Zepeda; +Cc: git

Alex Zepeda <alex@inferiorhumanorgans.com> writes:

> 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>
> ---

Makes sense; thanks.

>  builtin/verify-tag.c |   10 +++++++++-
>  1 files changed, 9 insertions(+), 1 deletions(-)
>
> diff --git a/builtin/verify-tag.c b/builtin/verify-tag.c
> index 28c2174..986789f 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);

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-03-08 22:01 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-08 20:07 [PATCH] verify-tag: Parse GPG configuration options Alex Zepeda
2012-03-08 22:01 ` Junio C Hamano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).