From: Junio C Hamano <gitster@pobox.com>
To: Colin Hinton <colinlewishinton@gmail.com>
Cc: git@vger.kernel.org, m@lfurio.us
Subject: Re: [PATCH v6] fetch.c: defer fetch.followRemoteHEAD validation
Date: Wed, 07 Oct 2026 09:50:33 -0700 [thread overview]
Message-ID: <xmqqece1a206.fsf@gitster.g> (raw)
In-Reply-To: <20261006032258.6561-1-colinlewishinton@gmail.com> (Colin Hinton's message of "Mon, 5 Oct 2026 20:22:58 -0700")
Colin Hinton <colinlewishinton@gmail.com> writes:
> The value of the fetch.followRemoteHEAD configuration variable is
> validated while the configuration file is being parsed, which
> produces a warning even when this particular "git fetch" invocation
> will never consult it.
>
> Store the raw config string instead, and resolve/validate it lazily
> at the one place in do_fetch() that actually uses it, so a mistyped
> value only warns, and a missing value only dies, when this fetch
> would have consulted it.
>
> remote.c's handle_config() has the same problem for
> remote.<name>.followRemoteHEAD, but is left unaddressed here since
> it touches shared remote-parsing infrastructure used well beyond
> fetch. Leave a NEEDSWORK comment at remote.c:handle_config()
> that has a defect similar to what is fixed by this patch,
> so the remaining scope is easy to find for a follow-up patch.
>
> Signed-off-by: Colin Hinton <colinlewishinton@gmail.com>
> ---
> builtin/fetch.c | 73 +++++++++++++++++++++++++------------------------
> remote.c | 7 +++++
> 2 files changed, 44 insertions(+), 36 deletions(-)
OK. We agreed to punt on remote.*.followRemoteHEAD in this topic,
even though it may leave them inconsistent with what the improved
code does to fetch.followRemoteHEAD, this should be good enough.
One usability regression is that the users will no longer see the
config machinery to report which line of what configuration file has
the problematic setting, but nobody seemed to bring it up during
these iterations. We have done similar conversions like this on
other configuration values in the past, and haven't heard people
complain about lack of source:line information, either. So it
probably does not matter.
Let's mark the topic for 'next'.
Thanks.
prev parent reply other threads:[~2026-10-07 16:50 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-22 4:00 [PATCH] fetch.c: defer fetch.followRemoteHEAD validation Colin Hinton
2026-09-22 5:32 ` Junio C Hamano
2026-09-23 5:03 ` Colin Hinton
2026-09-24 7:50 ` Matt Hunter
2026-09-25 18:48 ` Colin Hinton
2026-09-24 7:50 ` Matt Hunter
2026-09-25 19:26 ` [PATCH v2] " Colin Hinton
2026-09-25 19:40 ` Junio C Hamano
2026-09-25 20:30 ` Colin Hinton
2026-09-30 4:21 ` Matt Hunter
2026-09-30 18:46 ` Junio C Hamano
2026-10-03 4:50 ` Colin Hinton
2026-09-25 23:06 ` [PATCH v3] " Colin Hinton
2026-10-03 23:14 ` [PATCH v4] " Colin Hinton
2026-10-04 13:27 ` Junio C Hamano
2026-10-04 15:40 ` Colin Hinton
2026-10-04 17:42 ` Junio C Hamano
2026-10-04 20:14 ` [PATCH v5] " Colin Hinton
2026-10-05 9:05 ` Matt Hunter
2026-10-05 13:07 ` Junio C Hamano
2026-10-06 3:22 ` [PATCH v6] " Colin Hinton
2026-10-07 16:50 ` 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=xmqqece1a206.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox