Re: [PATCH v2 0/3] remote: replace static variables with struct remote_state
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Oct 13, 2021, 20:27 UTC
- Message-ID
- <xmqq8rywfz6x.fsf@gitster.g>
- In-Reply-To
- <xmqqtuhkfzw8.fsf@gitster.g>
Junio C Hamano <gitster@pobox.com> writes:
Show 7 quoted lines
> 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.