Thread (1 message) 1 message, 1 author, 2021-10-20

Re: [PATCH v3 2/4] remote: use remote_state parameter internally

From: Junio C Hamano <hidden>
Date: 2021-10-20 19:45:31

Glen Choo [off-list ref] writes:
Introduce a struct remote_state member to structs that need to
'remember' their remote_state. Without changing external-facing
functions, replace the_repository->remote_state internally by using the
remote_state member where it is applicable i.e. when a function accepts
a struct that depends on the remote_state. If it is not applicable, add
a struct remote_state parameter instead.

As a result, external-facing functions are still tied to the_repository,
but most static functions no longer reference
the_repository->remote_state. The exceptions are those that are used in
a way that depends on external-facing functions e.g. the callbacks to
remote_get_1().

Signed-off-by: Glen Choo <redacted>
---
 remote.c | 153 ++++++++++++++++++++++++++-----------------------------
 remote.h |  10 ++++
 2 files changed, 81 insertions(+), 82 deletions(-)
This made my "git push" to k.org and other places over ssh segfault
when their tip and what I am attempting to push are identical.  I
haven't spent more time than just to bisect the history down to
identify this commit as the possible culprit.

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help