Thread (178 messages) 178 messages, 10 authors, 2025-08-16

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

From: Phillip Wood <hidden>
Date: 2025-07-04 08:32:39

Hi Lucas

On 03/07/2025 15:14, Lucas Seiki Oshiro wrote:
quoted
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/ (local)
[2] https://summerofcode.withgoogle.com/programs/2025/projects/no7dVMeG
  
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help