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

Re: [PATCH] environment: move access to "core.attributesfile" into repo settings

From
Ayush Chandekar <ayu.chandekar@gmail.com>
Date
Mar 10, 2025, 09:07 UTC
Message-ID
<CAE7as+bm1+aMz3SpiYeZWD9PUHNjzOYNgKm_FnEPzJesSFcodA@mail.gmail.com>
In-Reply-To
<Z86PUkJ1sbSH2VTU@pks.im>

Hey, thanks for reviewing the patch!

> We typically switch the order around a bit in our commit messages: we
> first explain what the actual problem is, and then we say how we fix it.
Got it.
> Hm. I wonder what the actual merit of this function is after the
> refactoring. Right now there isn't really any as it is a direct wrapper
> of `repo_settings_get_attributesfile_path()`.

I can remove the function and replace all the instances with `repo_settings_get_attributesfile_path()`. What do you think?

> I think it would make sense to split out this change into a separate
> commit. The first commit would move the config into "repo-settings.c",
> the second commit would adapt functions and their callers as necessary.
Alright.
> Extraneous newline.
Apologies. Will fix it.
> I think we should just retain `git_attr_val_global()` and plug in
> `the_repository`. The extra change here doesn't add anything, and
> "builtin/var.c" being a builtin means is not reused anywhere else,
> either.

Makes sense. I will drop `repo_git_attr_val_globa()` and keep `git_attr_val_global()` with `the_repository`.

> We don't use curly braces around one-line statements.
Will fix it.
> One thing I'm missing is the code to `free()` the allocated memory in
> `repo_settings_clear()`.
Oh right.
> > \ No newline at end of file
Got it.

Thanks, Ayush:)

Previous: Patrick SteinhardtNext: Junio C Hamano
Message 3 of 18 in “environment: move access to "core.attributesfile" into repo settings”
  1. environment: move access to "core.attributesfile" into repo settingsAyush Chandekar, Mar 9, 2025
  2. Patrick SteinhardtMar 10, 2025
  3. Ayush ChandekarMar 10, 2025
  4. Junio C HamanoMar 10, 2025
  5. Ayush ChandekarMar 10, 2025
  6. Junio C HamanoMar 10, 2025
  7. 0/2 Stop depending on `the_repository` for core.attributesfileAyush Chandekar, Mar 10, 2025
  8. 1/2 environment: move access to "core.attributesfile" into repo settingsAyush Chandekar, Mar 10, 2025
  9. Karthik NayakMar 10, 2025
  10. 2/2 attr: use `repo_settings_get_attributesfile_path()` and update callersAyush Chandekar, Mar 10, 2025
  11. Karthik NayakMar 10, 2025
  12. Junio C HamanoMar 10, 2025
  13. Ayush ChandekarMar 11, 2025
  14. shejialuoMar 11, 2025
  15. Junio C HamanoMar 11, 2025
  16. Ayush ChandekarMar 11, 2025
  17. Outreachy intern: Request for the completion of this seriesOlamide Caleb Bello, Dec 8, 2025
  18. Bello OlamideDec 9, 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.