git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v2] remote.c: defer remote.<name>.followRemoteHEAD validation

From
Matt Hunter <m@lfurio.us>
Date
Oct 24, 2026, 09:28 UTC
Message-ID
<DMCYNNPMFVMA.S74D9Y3OQ9QE@lfurio.us>
In-Reply-To
<20261023185007.21642-1-colinlewishinton@gmail.com>
On Fri Oct 23, 2026 at 2:50 PM EDT, Colin Hinton wrote:
Show 30 quoted lines
> 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
Previous: Junio C HamanoNext: Junio C Hamano
Message 8 of 19 in “remote.c: defer remote.<name>.followRemoteHEAD validation”
  1. remote.c: defer remote.<name>.followRemoteHEAD validationColin Hinton, Oct 18, 2026
  2. Junio C HamanoOct 19, 2026
  3. Matt HunterOct 19, 2026
  4. Colin HintonOct 21, 2026
  5. Matt HunterOct 22, 2026
  6. remote.c: defer remote.<name>.followRemoteHEAD validationColin Hinton, Oct 23, 2026
  7. Junio C HamanoOct 23, 2026
  8. Matt HunterOct 24, 2026
  9. Junio C HamanoOct 24, 2026
  10. Junio C HamanoOct 25, 2026
  11. Colin HintonOct 28, 2026
  12. Junio C HamanoOct 28, 2026
  13. Matt HunterOct 30, 2026
  14. Junio C HamanoOct 30, 2026
  15. Matt HunterNov 1, 2026
  16. Junio C HamanoNov 6, 2026
  17. Matt HunterNov 6, 2026
  18. Junio C HamanoNov 6, 2026
  19. Colin HintonNov 8, 2026

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.