]> git.ipfire.org Git - thirdparty/git.git/commit
remote: add remote.*.negotiationRestrict config
authorDerrick Stolee <stolee@gmail.com>
Tue, 19 May 2026 16:24:51 +0000 (16:24 +0000)
committerJunio C Hamano <gitster@pobox.com>
Wed, 20 May 2026 02:33:24 +0000 (11:33 +0900)
commit8bb252f86c30a3066ec64f99f94719c01a53743a
tree134c234a9c2870c9265e96f1cf7451c04d34c6d0
parent4aef7dbb063cfd0923baae5a431913256edad667
remote: add remote.*.negotiationRestrict config

In a previous change, the --negotiation-restrict command-line option of 'git
fetch' was added as a synonym of --negotiation-tip. Both of these options
restrict the set of 'haves' the client can send as part of negotiation.

This was previously not available via a configuration option. Add a new
'remote.<name>.negotiationRestrict' multi-valued config option that updates
'git fetch <name>' to use these restrictions by default.

If the user provides even one --negotiation-restrict argument, then the
config is ignored.

An empty value resets the value list to allow ignoring earlier config
values, such as those that might be set in system or global config.

Reviewed-by: Matthew John Cheetham <mjcheetham@outlook.com>
Signed-off-by: Derrick Stolee <stolee@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/config/remote.adoc
builtin/fetch.c
remote.c
remote.h
t/t5510-fetch.sh