All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Renee Margaret McConahy <nepella@gmail.com>
Cc: git@vger.kernel.org, Paul Tan <pyokagan@gmail.com>
Subject: Re: [PATCH] am: configure gpg at startup
Date: Wed, 30 Sep 2015 12:25:36 -0700	[thread overview]
Message-ID: <xmqqtwqb7lqn.fsf@gitster.mtv.corp.google.com> (raw)
In-Reply-To: <560c2efb.894f320a.d43ae.4338@mx.google.com> (Renee Margaret McConahy's message of "Wed, 30 Sep 2015 13:49:44 -0400")

Renee Margaret McConahy <nepella@gmail.com> writes:

> The new builtin am ignores the user.signingkey variable: gpg is being
> called with the committer details as the key ID, which may not be
> correct. git_gpg_config is responsible for handling that variable and is
> expected to be called on initialization by any modules that use gpg.
>
> Perhaps git_gpg_config's functionality ought to be merged into
> git_default_config, but this is simpler and in keeping with the current
> practice.
>
> Signed-off-by: Renee Margaret McConahy <nepella@gmail.com>
> ---

Thanks.

I'd remove the unused "flags" (already pointed out by somebody, I
think), but otherwise the change looks sensible.


>  builtin/am.c | 14 +++++++++++++-
>  1 file changed, 13 insertions(+), 1 deletion(-)
>
> diff --git a/builtin/am.c b/builtin/am.c
> index 4f77e07..f0b0ffd 100644
> --- a/builtin/am.c
> +++ b/builtin/am.c
> @@ -2208,6 +2208,18 @@ enum resume_mode {
>  	RESUME_ABORT
>  };
>  
> +static int git_am_config(const char *k, const char *v, void *cb)
> +{
> +	int *flags = cb;
> +	int status;
> +
> +	status = git_gpg_config(k, v, NULL);
> +	if (status)
> +		return status;
> +
> +	return git_default_config(k, v, NULL);
> +}
> +
>  int cmd_am(int argc, const char **argv, const char *prefix)
>  {
>  	struct am_state state;
> @@ -2308,7 +2320,7 @@ int cmd_am(int argc, const char **argv, const char *prefix)
>  		OPT_END()
>  	};
>  
> -	git_config(git_default_config, NULL);
> +	git_config(git_am_config, NULL);
>  
>  	am_state_init(&state, git_path("rebase-apply"));

  parent reply	other threads:[~2015-09-30 19:25 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-30 17:49 [PATCH] am: configure gpg at startup Renee Margaret McConahy
2015-09-30 18:53 ` Eric Sunshine
2015-09-30 19:25 ` Junio C Hamano [this message]
2015-09-30 17:49   ` [PATCH v2] " Renee Margaret McConahy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqqtwqb7lqn.fsf@gitster.mtv.corp.google.com \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=nepella@gmail.com \
    --cc=pyokagan@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.