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

Re: [PATCH 1/2] config: allow config_with_options() to handle any repo

From
Matheus Tavares Bernardino <matheus.bernardino@usp.br>
Date
Aug 27, 2019, 23:46 UTC
Message-ID
<CAHd-oW4h80xrp6y65dqZbq_a67ncArC9rrNq7F7rAhBbrALOkA@mail.gmail.com>
In-Reply-To
<CACsJy8Dry7MfKBi5EKw4Ka9r63QVmDjPv9nAozS0mC6Z7-sG=w@mail.gmail.com>
Hi, Duy
On Tue, Aug 27, 2019 at 6:26 AM Duy Nguyen <pclouds@gmail.com> wrote:
Show 14 quoted lines
>
> On Tue, Aug 27, 2019 at 6:57 AM Matheus Tavares
> <matheus.bernardino@usp.br> wrote:
> >
> > Currently, config_with_options() relies on the global the_repository
> > when it has to configure from a blob.
>
> Not really reading the patch, but my last experience with moving
> config.c away from the_repo [1] shows that there are more hidden
> dependencies, in git_path() and particularly the git_config_clear()
> call in git_config_set_multivar_... Not really sure if those deps
> really affect your goals or not. Have a look at that branch, filtering
> on config.c for more info (and if you want to pick up some patches
> from that, you have my sign-off).

Thanks for the advice. Indeed, I see now that do_git_config_sequence() may call git_pathdup(), which relies on the_repo. For my use in patch 2/2, repo_config_with_options() won't ever get to call do_git_config_sequence(), so that's fine. But in other use cases it may have to, so I'll need to check that.

> [1] https://gitlab.com/pclouds/git/commits/submodules-in-worktrees
>
> --
> Duy
Previous: Duy NguyenNext: Matheus Tavares Bernardino
Message 4 of 10 in “config: make config_with_options() handle any repo”
  1. 0/2 config: make config_with_options() handle any repoMatheus Tavares, Aug 26, 2019
  2. 1/2 config: allow config_with_options() to handle any repoMatheus Tavares, Aug 26, 2019
  3. Duy NguyenAug 27, 2019
  4. Matheus Tavares BernardinoAug 27, 2019
  5. Matheus Tavares BernardinoAug 29, 2019
  6. Duy NguyenAug 29, 2019
  7. Jeff KingAug 29, 2019
  8. Matheus Tavares BernardinoAug 29, 2019
  9. Duy NguyenAug 30, 2019
  10. 2/2 submodule: pass repo instead of adding to alternates listMatheus Tavares, Aug 26, 2019

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.