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

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

From
Junio C Hamano <gitster@pobox.com>
Date
Oct 28, 2026, 14:26 UTC
Message-ID
<xmqqmrrxdhox.fsf@gitster.g>
In-Reply-To
<CAHeTm9NOqLA=BfTU9ABDFt8+jOzaRDPRrMNP8thzAQN2NVZAew@mail.gmail.com>
Colin Hinton <colinlewishinton@gmail.com> writes:
Show 17 quoted lines
>> 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.
Previous: Colin HintonNext: Matt Hunter
Message 12 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.