git/builtin
Derrick Stolee 6f37fecfed 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.

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>
2026-05-20 11:33:24 +09:00
..
add.c Merge branch 'cs/add-skip-submodule-ignore-all' 2026-03-09 14:36:55 -07:00
am.c run-command: wean auto_maintenance() functions off the_repository 2026-03-12 08:30:57 -07:00
annotate.c
apply.c
archive.c
backfill.c Merge branch 'ob/core-attributesfile-in-repository' 2026-03-05 10:04:49 -08:00
bisect.c refs: replace `refs_for_each_glob_ref_in()` 2026-02-23 13:21:19 -08:00
blame.c mailmap: stop using the_repository 2026-02-20 08:13:58 -08:00
branch.c environment: move "branch.autoSetupMerge" into `struct repo_config_values` 2026-02-26 07:22:53 -08:00
bugreport.c
bundle.c
cat-file.c Merge branch 'ps/odb-sources' 2026-03-12 14:09:07 -07:00
check-attr.c
check-ignore.c
check-mailmap.c mailmap: stop using the_repository 2026-02-20 08:13:58 -08:00
check-ref-format.c
checkout--worker.c
checkout-index.c
checkout.c Merge branch 'cs/add-skip-submodule-ignore-all' 2026-03-09 14:36:55 -07:00
clean.c Merge branch 'jk/color-variable-fixes' 2025-09-29 11:40:35 -07:00
clone.c Merge branch 'ob/core-attributesfile-in-repository' 2026-03-05 10:04:49 -08:00
column.c
commit-graph.c commit-graph: add new config for changed-paths & recommend it in scalar 2025-10-22 10:40:11 -07:00
commit-tree.c commit: rename `free_commit_list()` to conform to coding guidelines 2026-01-15 05:32:31 -08:00
commit.c Merge branch 'lc/rebase-trailer' 2026-03-19 09:54:56 -07:00
config.c config: use an enum for type 2026-02-23 13:23:41 -08:00
count-objects.c packfile: introduce macro to iterate through packs 2025-10-16 14:42:39 -07:00
credential-cache--daemon.c
credential-cache.c
credential-store.c builtin/credential-store: move is_rfc3986_unreserved to url.[ch] 2026-01-12 11:56:56 -08:00
credential.c
describe.c refs: replace `refs_for_each_rawref()` 2026-02-23 13:21:18 -08:00
diagnose.c
diff-files.c
diff-index.c
diff-pairs.c
diff-tree.c Merge branch 'ps/commit-list-functions-renamed' 2026-02-13 13:39:25 -08:00
diff.c diff: --no-index should ignore the worktree 2025-08-09 17:22:01 -07:00
difftool.c
fast-export.c string-list: add string_list_sort_u() that mimics "sort -u" 2026-01-29 09:32:50 -08:00
fast-import.c odb: embed base source in the "files" backend 2026-03-05 11:45:15 -08:00
fetch-pack.c
fetch.c remote: add remote.*.negotiationInclude config 2026-05-20 11:33:24 +09:00
fmt-merge-msg.c builtin/fmt-merge-msg: stop depending on 'the_repository' 2025-08-11 09:19:40 -07:00
for-each-ref.c Merge branch 'ms/refs-list' 2025-08-22 13:13:20 -07:00
for-each-repo.c for-each-repo: simplify passing of parameters 2026-03-03 10:20:00 -08:00
fsck.c Merge branch 'ps/refs-for-each' 2026-03-09 14:36:55 -07:00
fsmonitor--daemon.c
gc.c run-command: wean start_command() off the_repository 2026-03-12 08:30:57 -07:00
get-tar-commit-id.c
grep.c Merge branch 'ps/odb-sources' 2026-03-12 14:09:07 -07:00
hash-object.c
help.c completion: fix zsh alias listing for subsection aliases 2026-02-19 10:13:20 -08:00
history.c history: initialize rev_info in cmd_history_reword() 2026-03-09 12:34:52 -07:00
hook.c hook: add -z option to "git hook list" 2026-02-19 13:24:57 -08:00
index-pack.c odb: embed base source in the "files" backend 2026-03-05 11:45:15 -08:00
init-db.c
interpret-trailers.c trailer: libify a couple of functions 2026-03-06 13:02:19 -08:00
last-modified.c Merge branch 'tc/last-modified-not-a-tree' 2026-02-13 13:39:25 -08:00
log.c Merge branch 'kh/format-patch-noprefix-is-boolean' 2026-03-10 14:23:17 -07:00
ls-files.c Merge branch 'ds/ls-files-lazy-unsparse' 2025-09-08 14:54:35 -07:00
ls-remote.c ref-filter: propagate peeled object ID 2025-11-04 07:32:25 -08:00
ls-tree.c cocci: convert parse_tree functions to repo_ variants 2026-01-09 18:36:18 -08:00
mailinfo.c
mailsplit.c
merge-base.c commit: rename `free_commit_list()` to conform to coding guidelines 2026-01-15 05:32:31 -08:00
merge-file.c Merge branch 'rs/xdiff-wo-the-repository' 2026-02-17 13:30:42 -08:00
merge-index.c
merge-ours.c merge-ours: integrate with sparse-index 2026-02-06 11:45:33 -08:00
merge-recursive.c builtin: also setup gently for --help-all 2025-08-08 11:13:12 -07:00
merge-tree.c Merge branch 'ps/commit-list-functions-renamed' 2026-02-13 13:39:25 -08:00
merge.c run-command: wean auto_maintenance() functions off the_repository 2026-03-12 08:30:57 -07:00
mktag.c Merge branch 'ps/object-file-wo-the-repository' 2025-08-05 11:53:55 -07:00
mktree.c
multi-pack-index.c Merge branch 'ps/object-store-midx-dedup-info' 2025-09-12 10:41:18 -07:00
mv.c environment: stop using core.sparseCheckout globally 2026-02-26 07:22:51 -08:00
name-rev.c name-rev: use commit_stack 2025-12-25 08:29:27 +09:00
notes.c Merge branch 'jc/strbuf-split' 2025-08-21 13:47:00 -07:00
pack-objects.c Merge branch 'ps/odb-sources' 2026-03-12 14:09:07 -07:00
pack-redundant.c pack-redundant: fix memory leak when open_pack_index() fails 2026-02-21 21:26:53 -08:00
pack-refs.c builtin/pack-refs: factor out core logic into a shared library 2025-09-19 10:02:55 -07:00
patch-id.c patch-id: use “patch ID” throughout 2026-01-09 06:07:21 -08:00
prune-packed.c
prune.c Merge branch 'ps/object-file-wo-the-repository' 2025-08-05 11:53:55 -07:00
pull.c fetch: add --negotiation-include option for negotiation 2026-05-20 11:33:24 +09:00
push.c environment: move "branch.autoSetupMerge" into `struct repo_config_values` 2026-02-26 07:22:53 -08:00
range-diff.c Merge branch 'kh/format-patch-range-diff-notes' 2025-10-14 12:56:09 -07:00
read-tree.c cocci: convert parse_tree functions to repo_ variants 2026-01-09 18:36:18 -08:00
rebase.c Merge branch 'lc/rebase-trailer' 2026-03-19 09:54:56 -07:00
receive-pack.c run-command: wean auto_maintenance() functions off the_repository 2026-03-12 08:30:57 -07:00
reflog.c Merge branch 'ps/reflog-migrate-fixes' into maint-2.51 2025-10-15 10:29:28 -07:00
refs.c Merge branch 'ms/refs-optimize' 2025-10-02 12:26:12 -07:00
remote-ext.c
remote-fd.c
remote.c refs: replace `refs_for_each_rawref_in()` 2026-02-23 13:21:19 -08:00
repack.c builtin/repack: handle promisor packs with geometric repacking 2026-01-14 06:29:24 -08:00
replace.c refs: introduce wrapper struct for `each_ref_fn` 2025-11-04 07:32:24 -08:00
replay.c builtin/replay: move core logic into "libgit.a" 2026-01-13 05:41:16 -08:00
repo.c Merge branch 'jt/repo-structure-extrema' 2026-03-16 10:48:14 -07:00
rerere.c
reset.c Merge branch 'aa/add-p-no-auto-advance' 2026-03-03 11:08:13 -08:00
rev-list.c Merge branch 'sk/oidmap-clear-with-custom-free-func' 2026-03-12 10:56:04 -07:00
rev-parse.c refs: replace `refs_for_each_fullref_in()` 2026-02-23 13:21:19 -08:00
revert.c Merge branch 'pw/3.0-commentchar-auto-deprecation' 2025-09-18 10:07:00 -07:00
rm.c
send-pack.c
shortlog.c mailmap: stop using the_repository 2026-02-20 08:13:58 -08:00
show-branch.c commit: rename `free_commit_list()` to conform to coding guidelines 2026-01-15 05:32:31 -08:00
show-index.c show-index: use gettext wrapping in user facing error messages 2026-01-30 08:58:12 -08:00
show-ref.c refs: replace `refs_for_each_fullref_in()` 2026-02-23 13:21:19 -08:00
sparse-checkout.c Merge branch 'ob/core-attributesfile-in-repository' 2026-03-05 10:04:49 -08:00
stash.c Merge branch 'aa/add-p-no-auto-advance' 2026-03-03 11:08:13 -08:00
stripspace.c
submodule--helper.c Merge branch 'ss/submodule--helper-use-xmalloc' 2026-03-19 09:54:57 -07:00
symbolic-ref.c
tag.c commit, tag: parse --trailer with OPT_STRVEC 2026-03-06 13:02:20 -08:00
unpack-file.c
unpack-objects.c object-file: refactor writing objects via a stream 2025-11-03 12:18:48 -08:00
update-index.c odb: add transaction interface 2025-09-16 11:37:06 -07:00
update-ref.c update-ref: utilize rejected error details if available 2026-01-25 22:27:33 -08:00
update-server-info.c
upload-archive.c path: move `enter_repo()` into "setup.c" 2025-11-19 17:41:03 -08:00
upload-pack.c path: move `enter_repo()` into "setup.c" 2025-11-19 17:41:03 -08:00
var.c Merge branch 'jc/string-list-split' 2025-08-21 13:46:59 -07:00
verify-commit.c
verify-pack.c
verify-tag.c tag: support arbitrary repositories in gpg_verify_tag() 2025-12-29 22:02:53 +09:00
worktree.c worktree: do not pass strbuf by value 2026-03-11 11:08:53 -07:00
write-tree.c