]> git.ipfire.org Git - thirdparty/git.git/commit
remote: add remote.*.negotiationInclude config
authorDerrick Stolee <stolee@gmail.com>
Wed, 22 Apr 2026 15:25:45 +0000 (15:25 +0000)
committerJunio C Hamano <gitster@pobox.com>
Wed, 22 Apr 2026 23:10:33 +0000 (16:10 -0700)
commit024c12ce72aabdcb1fee32bf848edb341b45169f
tree96015dacbbac81e643276ab7293f0289052c565c
parent68f8a9e61b5732b6bf676227a973d55f27f2b79c
remote: add remote.*.negotiationInclude config

Add a new 'remote.<name>.negotiationInclude' multi-valued config option that
provides default values for --negotiation-include when no
--negotiation-include arguments are specified over the command line.  This
is a mirror of how 'remote.<name>.negotiationRestrict' specifies defaults
for the --negotiation-restrict arguments.

Each value is either an exact ref name or a glob pattern whose tips should
always be sent as 'have' lines during negotiation. The config values are
resolved through the same resolve_negotiation_include() codepath as the CLI
options.

This option is additive with the normal negotiation process: the negotiation
algorithm still runs and advertises its own selected commits, but the refs
matching the config are sent unconditionally on top of those heuristically
selected commits.

Similar to the negotiationRestrict config, 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.

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