Subject: Re: [GSoC RFC PATCH v2 6/7] repo-info: add field layout.bare

From: Phillip Wood <[email-masked]>
Date: Fri, 4 Jul 2025 09:32:34 +0100

Hi Lucas

On 03/07/2025 15:14, Lucas Seiki Oshiro wrote:
> 
>> Meh, `is_bare_repository()` strikes again :/
> 
> Yeah... I tried to avoid it but removing that dependency is work for its own
> patch...

I really wouldn't worry too much about using "the_repository" in code 
that lives under builtin/. The reason to avoid it is so that one git 
process can operate on multiple repositories but until our library code 
stops using "the_repository" and actually respects the repository passed 
to it there seems little point in worrying about using it in non-library 
code. As it is we're currently adding more instances of "the_repository" 
to our library code as a stepping stone to removing other global 
variables. Once our library code can operate on an arbitrary repository 
we can then think about which files under builtin/ want to operate on 
more than one repository and avoid "the_repository" in those. Until then 
worrying about using "the_repository" under builtin/ is a distraction 
from fixing the library code.

Thanks

Phillip

> I asked Ayush [1] about this as his GSoC project [2] is related to reduce the
> dependency on `the_repository`.
> 
> 
> [1] https://lore.kernel.org/git/CAE7as+bTKE5opov-Xn0P8R+cy+=[email-masked]/
> [2] https://summerofcode.withgoogle.com/programs/2025/projects/no7dVMeG