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, 17:21 UTC
Message-ID
<CAE7as+aSRuo9sFxSX8M66HB3EOH+_OwugAnAJfN800_6GiDqBQ@mail.gmail.com>
In-Reply-To
<xmqqwmcw97z2.fsf@gitster.g>
Show 13 quoted lines
> Another thing that felt awkward about this change is actually
> larger.  The current attributes globals are built around the notion
> that the functions involved work on a single set of attributes at a
> time.  Even in a single repository, when you are checking new contents
> into the object database and when you are checking objects out of
> the object database, you'd need to switch the direction manually,
> which means you always have two sets of attributes active that you
> can switch between (one is from the working tree and the other one
> is from the index, if I am recalling correctly).
>
> But step back and think.  What does it mean to make them belong to a
> repository instance?  Whose index and working tree does the attribute
> set that belongs to a repository that is not the_repository come from?

I'm trying my best to wrap my head around this. I definitely don't fully understand your review yet since I'm still quite new to the codebase. I get what you mean when you said which repo does it belong to. But in the long term, isn’t our goal to get rid of the_repository anyway? So at some point, wouldn't we need to either attach attributes to a repository or have the attribute set know about its repository?

Thanks, Ayush:)

Previous: Junio C HamanoNext: Junio C Hamano
Message 5 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.