From: "Matt Hunter" <m@lfurio.us>
To: "Colin Hinton" <colinlewishinton@gmail.com>, <git@vger.kernel.org>
Cc: <gitster@pobox.com>
Subject: Re: [PATCH v2] remote.c: defer remote.<name>.followRemoteHEAD validation
Date: Sat, 24 Oct 2026 05:28:46 -0400 [thread overview]
Message-ID: <DMCYNNPMFVMA.S74D9Y3OQ9QE@lfurio.us> (raw)
In-Reply-To: <20261023185007.21642-1-colinlewishinton@gmail.com>
On Fri Oct 23, 2026 at 2:50 PM EDT, Colin Hinton wrote:
> Continuing from 86129fd (fetch.c: defer fetch.followRemoteHEAD
> validation), apply the same treatment to
> remote.<name>.followRemoteHEAD, which is still validated in
> handle_config(). That emits a warning for any command that loads the
> remote configuration, such as "git push" or "git remote -v", even
> though only "git fetch" ever consults the value.
>
> Store the raw string in struct remote instead, and resolve it lazily
> in do_fetch() through the get_follow_remote_head() helper introduced
> by 86129fd. This replaces the parsed follow_remote_head and
> no_warn_branch members, and the NEEDSWORK comment left behind by
> 86129fd is removed. "git remote set-head" now compares against the
> raw string to decide whether to rewrite "always" to "warn".
>
> Moved enum follow_remote_head_settings to builtin/fetch.c as it is no
> longer referenced in remote.
>
> Messages for an unrecognized or missing value name the full variable
> name prefix, as the helper now serves both the fetch-level and
> the remote-level setting.
>
> Signed-off-by: Colin Hinton <colinlewishinton@gmail.com>
> ---
> Documentation/config/remote.adoc | 4 +--
> builtin/fetch.c | 45 +++++++++++++++++++++-----------
> builtin/remote.c | 3 ++-
> remote.c | 28 +++-----------------
> remote.h | 13 ++-------
> t/t5510-fetch.sh | 18 +++++++++++++
> 6 files changed, 58 insertions(+), 53 deletions(-)
Besides Junio's whitespace notes, I have no additional comments. Looks
good.
Thanks
next prev parent reply other threads:[~2026-10-24 9:29 UTC|newest]
Thread overview: 10+ 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 [this message]
2026-10-24 16:47 ` Junio C Hamano
2026-10-25 2:16 ` Junio C Hamano
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=DMCYNNPMFVMA.S74D9Y3OQ9QE@lfurio.us \
--to=m@lfurio.us \
--cc=colinlewishinton@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox