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:)