Thread (61 messages) flat view 61 messages, 6 authors, 2021-09-27

Re: [PATCH 2/7] grep: use submodule-ODB-as-alternate lazy-addition

From: Jonathan Tan <hidden>
Date: 2021-08-13 16:31:22

I had wondered whether we can entirely drop add_to_alternates_memory()
but I see on second reading that that's still used by
register_all_submodule_odb...(). I wonder if it can become static in
submodule.c to prevent users from dodging the envvar+BUG()?
You mean make add_to_alternates_memory() static? I'm not sure how we can
do that - alternates is a concern that extends beyond submodules.
Curious whether add_submodule_odb() can be reduced by calling
add_submodule_odb_by_path() internally.
That's a reasonable idea, but I don't think it works in this case - in
particular, add_submodule_odb_by_path() dups its argument whereas
add_submodule_odb() already has an allocated string that it is prepared
to give up ownership of. Also, add_submodule_odb_by_path() is only one
line, so it won't save us much.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help