git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] am: configure gpg at startup

From
Eric Sunshine <sunshine@sunshineco.com>
Date
Sep 30, 2015, 18:53 UTC
Message-ID
<CAPig+cSqp+o+MNDyprF8SY1on-SZucTEHWc1Zi2QOnr_93k5jA@mail.gmail.com>
In-Reply-To
<560c2efb.894f320a.d43ae.4338@mx.google.com>

On Wed, Sep 30, 2015 at 1:49 PM, Renee Margaret McConahy <nepella@gmail.com> wrote:

Show 22 quoted lines
> 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>
> ---
> 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;
'flags' seems to be unused.
Show 23 quoted lines
> +       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"));
>
> --
> 2.6.0
Previous: Renee Margaret McConahyNext: Junio C Hamano
Message 2 of 4 in “am: configure gpg at startup”
  1. am: configure gpg at startupRenee Margaret McConahy, Sep 30, 2015
  2. Eric SunshineSep 30, 2015
  3. Junio C HamanoSep 30, 2015
  4. am: configure gpg at startupRenee Margaret McConahy, Sep 30, 2015

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.