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

Re: [PATCH 0/2] gpg-interface: cleanup + convert low hanging fruit to configset API

From
Junio C Hamano <gitster@pobox.com>
Date
Feb 10, 2023, 19:02 UTC
Message-ID
<xmqqv8k9ibtd.fsf@gitster.g>
In-Reply-To
<230210.86mt5lx0bq.gmgdl@evledraar.gmail.com>
Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:
Show 14 quoted lines
>> What's your intention of sending these?
>
> For them to be picked up on top of your jc/gpg-lazy-init.
>
>> I think we are already in
>> agreement that the churn may not be worth the risk, so if these are
>> "and here is the churn would look like, not for application", I
>> would understand it and appreciate it.  But did you mean that these
>> patches are for application?  I am not sure...
>
> I understood your "I specifically did not want anybody to start doing
> this line of analysis" in [1] to mean that you didn't want to have the
> sort of change that the last paragraph of 2/2 notes that we're
> deliberately not doing.

I didn't want to see "oh you are calling lazy_init here but you can delay it even further" kind of comments that is wrong and wastes our time.

> I.e. that we'd like to keep the gpg_interface_lazy_init() boilerplate,
> even though we might carefully reason that a specific API entry point
> won't need to initialize the file-scoped config variables right now.
It is the complete opposite of what I meant.
Changing
	git_am_config(...) {
		return git_default_config(...);
	}
	... 
		git_config(git_am_config);
to
	/* no git_am_config() */
	...
		git_config(git_default_config);
is perfectly fine as a clean-up post series.

If we are moving away from git_config() callback style, and move to git_config_get_*() style, the upthread already said it does not have a good risk/benefit ratio, but if we were to do so, then we should not leave some still using the callback style while others using git_config_get_*(), which will lead to configuration read in a wrong order and easily breaking precedence rules.

And if we were to move away completely from the callback style, then I do not see a point to build such a series on top of the lazy init patch, which is about staying with the callback style.

So, that is exactly why I asked the question after seeing it was marked to apply on top of the lazy init thing, which did not make sense to me.

Previous: Ævar Arnfjörð Bjarmason
Message 6 of 6 in “gpg-interface: cleanup + convert low hanging fruit to configset API”
  1. 0/2 gpg-interface: cleanup + convert low hanging fruit to configset APIÆvar Arnfjörð Bjarmason, Feb 9, 2023
  2. 1/2 {am,commit-tree,verify-{commit,tag}}: refactor away config wrapperÆvar Arnfjörð Bjarmason, Feb 9, 2023
  3. 2/2 gpg-interface.c: lazily get GPG config variables on demandÆvar Arnfjörð Bjarmason, Feb 9, 2023
  4. Junio C HamanoFeb 9, 2023
  5. Ævar Arnfjörð BjarmasonFeb 10, 2023
  6. Junio C HamanoFeb 10, 2023

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.