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

Re: [RFC PATCH] config: teach `repo_config()` to allow `repo` to be NULL

From
Eric Sunshine <sunshine@sunshineco.com>
Date
Feb 27, 2025, 18:35 UTC
Message-ID
<CAPig+cSimWQg3VbFUZfxDvy3=LQk2FByx7yYKEi6BX_0jjYhCQ@mail.gmail.com>
In-Reply-To
<20250227175456.1129840-1-usmanakinyemi202@gmail.com>

On Thu, Feb 27, 2025 at 12:55 PM Usman Akinyemi <usmanakinyemi202@gmail.com> wrote:

Show 7 quoted lines
> The `repo` value can be NULL if a builtin command is run outside
> any repository. The current implementation of `repo_config()` will
> fail if `repo` is NULL.
>
> If the `repo` is NULL the `repo_config()` can ignore the repository
> configuration but it should read the other configuration sources like
> the system-side configuration instead of failing.
s/side/wide/
Show 7 quoted lines
> Teach the `repo_config()` to allow `repo` to be NULL by calling the
> `read_very_early_config()` which read config but only enumerate system
> and global settings.
>
> Suggested-by: Junio C Hamano <gitster@pobox.com>
> Mentored-by: Christian Couder <chriscool@tuxfamily.org>
> Signed-off-by: Usman Akinyemi <usmanakinyemi202@gmail.com>
Previous: Usman AkinyemiNext: Junio C Hamano
Message 2 of 9 in “config: teach `repo_config()` to allow `repo` to be NULL”
  1. config: teach `repo_config()` to allow `repo` to be NULLUsman Akinyemi, Feb 27, 2025
  2. Eric SunshineFeb 27, 2025
  3. Junio C HamanoFeb 27, 2025
  4. Phillip WoodFeb 28, 2025
  5. Junio C HamanoFeb 28, 2025
  6. Usman AkinyemiFeb 28, 2025
  7. Junio C HamanoMar 1, 2025
  8. Usman AkinyemiMar 3, 2025
  9. Junio C HamanoMar 3, 2025

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.