Re: [PATCH v2 02/10] promisor-remote: pass config entry to all_fields_match() directly
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Apr 7, 2026, 16:56 UTC
- Message-ID
- <xmqqh5pm6761.fsf@gitster.g>
- In-Reply-To
- <20260407115243.358642-3-christian.couder@gmail.com>
Christian Couder <christian.couder@gmail.com> writes:
> This removes the hidden dependency on `advertised->name` inside > all_fields_match(), which would be wrong if in the future > auto-configured remotes are implemented, as the local config name may > differ from the server's advertised name.
Interesting.
The caller, should_accept_remote(), still uses remote_name variable that is an alias to advertised->name to find the config_entry to pass down the callchain, so this step does not change the fact that we are still using their name and not overriding it with our local name, but hopefully we will see such a change on the caller's side to allow us do so.
> While at it, let's also add a comment before all_fields_match() and > match_field_against_config() to help understand how things work and > help avoid similar issues.
Very well done.