From: Junio C Hamano Date: Sat, 07 Feb 2026 21:41:07 GMT Subject: Re: [PATCH] [RFC][GSoC][PATCH] attr: use local repository state in read_attr Message-ID: In-Reply-To: Lucas Seiki Oshiro writes: >> read_attr() currently relies on is_bare_repository(), which >> implicitly depends on the global the_repository. > > So, wouldn't it be better to make is_bare_repository depend > on a `struct repository *repo` instead of `the_repository`? The codepath read_attr() is in is usually not that hot but it is not cheap. The repository object should have a boolean that says "I am bare", perhaps initialized lazily, and your version of is_bare_repository that takes a repository object would be a good entry point to it. Also, IIRC, there is another releated effort to allow attribute data source to become per repository. This change may want to coordinate with it. Thanks.