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

Re: [PATCH] sequencer: fix gpg option passed to octopus merge

From
Junio C Hamano <gitster@pobox.com>
Date
Oct 12, 2020, 20:11 UTC
Message-ID
<xmqqft6jnr0h.fsf@gitster.c.googlers.com>
In-Reply-To
<xmqq362jp6yo.fsf@gitster.c.googlers.com>
Junio C Hamano <gitster@pobox.com> writes:
Show 27 quoted lines
> Junio C Hamano <gitster@pobox.com> writes:
>
>> Phillip Wood <phillip.wood123@gmail.com> writes:
>>
>>> In run_git_commit() we do
>>>
>>> 	if (opts->gpg_sign)
>>> 		strvec_pushf(&cmd.args, "-S%s", opts->gpg_sign);
>>> 	else
>>> 		strvec_push(&cmd.args, "--no-gpg-sign");
>>>
>>> I'm not immediately clear why we pass --no-gpg-sign when
>>> opts->gpg_sign isn't set ...
>>
>> Isn't it because there is a configuration that the &cmd may honor
>> that forces gpg signing all the time?
>>
>>> but it makes me wonder if we should be doing
>>> that here as well
>
> I was reacting only based on what I saw in these message, but it
> turns out that cmd above is an internal invocation of "git merge";
> as the command does honor the "commit.gpgsign" option, if "rebase"
> or whatever command that invoked the sequencer turned off the
> signing by setting opts->gpg_sign to false, I agree that the part
> touched by the patch should have the else clause to explicitly
> override the configuration option.

Forgot to say that it is perfectly fine to leave it outside Samuel's patch. It "fixes" the "intended" behaviour of the current design where it somehow was deemed a good idea to disallow overriding commit.gpgsign variable. Fixing that design so that we can override configured default from the command line can be left for a follow-up patch.

Thanks.
Previous: Junio C HamanoNext: Junio C Hamano
Message 8 of 11 in “sequencer: fix gpg option passed to octopus merge”
  1. sequencer: fix gpg option passed to octopus mergeSamuel Čavoj, Oct 11, 2020
  2. brian m. carlsonOct 11, 2020
  3. Johannes SchindelinOct 12, 2020
  4. Phillip WoodOct 12, 2020
  5. Junio C HamanoOct 12, 2020
  6. Phillip WoodOct 12, 2020
  7. Junio C HamanoOct 12, 2020
  8. Junio C HamanoOct 12, 2020
  9. Junio C HamanoOct 12, 2020
  10. Johannes SchindelinOct 12, 2020
  11. Junio C HamanoOct 13, 2020

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.