From: Junio C Hamano <gitster@pobox.com>
To: Colin Hinton <colinlewishinton@gmail.com>
Cc: git@vger.kernel.org, m@lfurio.us
Subject: Re: [PATCH v2] remote.c: defer remote.<name>.followRemoteHEAD validation
Date: Wed, 28 Oct 2026 07:26:54 -0700 [thread overview]
Message-ID: <xmqqmrrxdhox.fsf@gitster.g> (raw)
In-Reply-To: <CAHeTm9NOqLA=BfTU9ABDFt8+jOzaRDPRrMNP8thzAQN2NVZAew@mail.gmail.com> (Colin Hinton's message of "Tue, 27 Oct 2026 19:56:33 -0700")
Colin Hinton <colinlewishinton@gmail.com> writes:
>> This part of the code becomes overly deeply indented, and more
>> importantly, the outer conditional around here has been reworked by
>> another topic and the code that learns follow_remote_head will have
>> to be reused elsewhere, which would lead to a nasty merge conflict.
>>
>> I'd like to see this part refactored into a separate helper
>> function, by squashing something like this on top of this patch.
>>
>> Thanks.
>
> Okay, I will refactor this into a helper method since yes the
> intending is becoming too much, I will also keep my eye on the patch
> you previously mentioned, and post a new version once Next has been
> updated from Harald's work so I can rebase with their fixes. Thanks
> for the feedback.
>
> -Colin Hinton
The 'ch/remote-defer-follow-remote-head-validation' branch at
https://github.com/gitster/git/ has a change on top that you can use
as a reference. If you are going to make this a two-patch series, it
may make sense to first extract the code commented with "See
remote.c's handling of ..." into a helper function, and then extend
it to cover the lazy behavior in the second patch. When viewed
that way, the helper function should not be named with a 'lazy_'
prefix as I mistakenly did. Being lazy is not its purpose. Its
point is to determine which setting of followRemoteHEAD is to be
used, and the helper function should be named after that concept.
Thanks.
prev parent reply other threads:[~2026-10-28 14:26 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-18 23:55 [PATCH v1] remote.c: defer remote.<name>.followRemoteHEAD validation Colin Hinton
2026-10-19 15:37 ` Junio C Hamano
2026-10-19 21:24 ` Matt Hunter
2026-10-21 16:30 ` Colin Hinton
2026-10-22 12:39 ` Matt Hunter
2026-10-23 18:50 ` [PATCH v2] " Colin Hinton
2026-10-23 21:59 ` Junio C Hamano
2026-10-24 9:28 ` Matt Hunter
2026-10-24 16:47 ` Junio C Hamano
2026-10-25 2:16 ` Junio C Hamano
2026-10-28 2:56 ` Colin Hinton
2026-10-28 14:26 ` Junio C Hamano [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqqmrrxdhox.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=colinlewishinton@gmail.com \
--cc=git@vger.kernel.org \
--cc=m@lfurio.us \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.