Re: [PATCH v3 2/4] remote: use remote_state parameter internally
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Oct 20, 2021, 19:45 UTC
- Message-ID
- <xmqqzgr3o4yw.fsf@gitster.g>
- In-Reply-To
- <20211019224339.61881-3-chooglen@google.com>
Glen Choo <chooglen@google.com> writes:
Show 18 quoted lines
> 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 <chooglen@google.com> > --- > 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.