Re: [PATCH v2 0/3] remote: replace static variables with struct remote_state

2 messages, 2 authors, 2021-10-13 · open the first message on its own page

Re: [PATCH v2 0/3] remote: replace static variables with struct remote_state

From: Junio C Hamano <hidden>
Date: 2021-10-13 20:27:11

Junio C Hamano [off-list ref] writes:
There may be some other (real) reason where the resistance comes
from, that you may not be telling us, though.  But in what was
described in the message I am responding to, I didn't see much
convincing reason to argue _for_ keeping the contained objects
ignorant of the container and forcing callers to pass both to
functions that use both the container and contained to compute
something.
I am not you, so I can only speculate, but the real reason _could_
be that it makes it simpler to formulate steps 2 and 3 mechanically.
After adding "repo" parameter to a function that used to take, say,
a "branch", in step 3, a future clean-up series could add a .repo
member to branch objects and remove the "repo" parameter from such
function.

I think that approach would make more work to get to the final
state, though.

Re: [PATCH v2 0/3] remote: replace static variables with struct remote_state

From: Glen Choo <hidden>
Date: 2021-10-13 22:00:57

Junio C Hamano [off-list ref] writes:
I am not you, so I can only speculate, but the real reason _could_
be that it makes it simpler to formulate steps 2 and 3 mechanically.
This is somewhat true, however...
I think that approach would make more work to get to the final
state, though.
I found that if I were to add the backpointer, it would have been better
to add it early and avoid this extra work that you mention here :)
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help