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

Re: [PATCH v2 3/4] config: factor out global config file retrieval

From
Patrick Steinhardt <ps@pks.im>
Date
Jan 19, 2024, 06:18 UTC
Message-ID
<ZaoUOPsze7rhtT2M@tanuki>
In-Reply-To
<32e5ec7d866ff8fd26554b325812c6e19cb65126.1705267839.git.code@khaugsbakk.name>
On Sun, Jan 14, 2024 at 10:43:18PM +0100, Kristoffer Haugsbakk wrote:
Show 5 quoted lines
> Factor out code that retrieves the global config file so that we can use
> it in `gc.c` as well.
> 
> Use the old name from the previous commit since this function acts
> functionally the same as `git_system_config` but for “global”.

I was briefly wondering whether we also want to give this new function a more descriptive name. For one, calling it `git_system_config()` which we have just removed in the preceding set may easily lead to confusion for any in-flight patch series because the parameters now got dropped (or at least it looks like that).

But second, I think that the new function you introduce here has the same issue as the old function that you refactored in the preceding patch: `git_config_global()` isn't very descriptive, and it is also inconsistent the new `git_config_global_paths()`. I'd propose to name the new function something like `git_config_global_preferred_path()` or `git_config_global_path()`.

Sorry for not mentioning this in my first review round. Also, it's only a minor concern, nothing that needs to block this series if either you or others disagree with my opinion.

Patrick
Previous: Kristoffer HaugsbakkNext: Kristoffer Haugsbakk
Message 21 of 33 in “maintenance: use XDG config if it exists”
  1. 0/4 maintenance: use XDG config if it existsKristoffer Haugsbakk, Oct 18, 2023
  2. 1/4 config: format newlinesKristoffer Haugsbakk, Oct 18, 2023
  3. 2/4 config: rename global config functionKristoffer Haugsbakk, Oct 18, 2023
  4. 3/4 config: factor out global config file retrievalKristoffer Haugsbakk, Oct 18, 2023
  5. Patrick SteinhardtOct 23, 2023
  6. Taylor BlauOct 23, 2023
  7. Kristoffer HaugsbakkOct 24, 2023
  8. Patrick SteinhardtOct 25, 2023
  9. Kristoffer HaugsbakkOct 25, 2023
  10. Patrick SteinhardtOct 25, 2023
  11. Junio C HamanoOct 27, 2023
  12. 4/4 maintenance: use XDG config if it existsKristoffer Haugsbakk, Oct 18, 2023
  13. Patrick SteinhardtOct 23, 2023
  14. Eric SunshineOct 23, 2023
  15. 0/4 maintenance: use XDG config if it existsKristoffer Haugsbakk, Jan 14, 2024
  16. 1/4 config: format newlinesKristoffer Haugsbakk, Jan 14, 2024
  17. 2/4 config: rename global config functionKristoffer Haugsbakk, Jan 14, 2024
  18. 3/4 config: factor out global config file retrievalKristoffer Haugsbakk, Jan 14, 2024
  19. Junio C HamanoJan 16, 2024
  20. Kristoffer HaugsbakkJan 16, 2024
  21. Patrick SteinhardtJan 19, 2024
  22. Kristoffer HaugsbakkJan 19, 2024
  23. Patrick SteinhardtJan 19, 2024
  24. Junio C HamanoJan 19, 2024
  25. Junio C HamanoJan 19, 2024
  26. rsbecker@nexbridge.comJan 19, 2024
  27. 4/4 maintenance: use XDG config if it existsKristoffer Haugsbakk, Jan 14, 2024
  28. Junio C HamanoJan 16, 2024
  29. 0/4 maintenance: use XDG config if it existsKristoffer Haugsbakk, Jan 18, 2024
  30. 1/4 config: format newlinesKristoffer Haugsbakk, Jan 18, 2024
  31. 2/4 config: rename global config functionKristoffer Haugsbakk, Jan 18, 2024
  32. 3/4 config: factor out global config file retrievalKristoffer Haugsbakk, Jan 18, 2024
  33. 4/4 maintenance: use XDG config if it existsKristoffer Haugsbakk, Jan 18, 2024

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.