From: Phillip Wood Date: Fri, 04 Jul 2025 08:32:34 GMT Subject: Re: [GSoC RFC PATCH v2 6/7] repo-info: add field layout.bare Message-ID: In-Reply-To: <6DBB30CE-D30F-42B6-A81C-35460B462D45@gmail.com> 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+=-XRkX9Wpie_W0717XMF1b_w@mail.gmail.com/ > [2] https://summerofcode.withgoogle.com/programs/2025/projects/no7dVMeG