]> git.ipfire.org Git - thirdparty/git.git/commit
environment: environment: stop using core.sparseCheckout globally
authorOlamide Caleb Bello <belkid98@gmail.com>
Tue, 13 Jan 2026 16:44:01 +0000 (17:44 +0100)
committerJunio C Hamano <gitster@pobox.com>
Tue, 13 Jan 2026 19:14:41 +0000 (11:14 -0800)
commitdae2d08cad0d2d4022f0f1ba2689b9680b3de95d
tree1a9cd145e279d61d5f6a2912c9410b521d311704
parent1dba24dc9f211fba4f61cb225159c0c740089876
environment: environment: stop using core.sparseCheckout globally

The config value `core.sparseCheckout` is parsed in
`git_default_core_config()` and stored globally in
`core_appy_sparse_checkout`. This could cause unintended behaviours
when different Git repositories running in the same process access this
variable.

Move the parsed value into `struct repo_config_values` which holds all the
values parsed by `git_default_config()` and can be accessed
per repo via `git_default_config()`. This retains current
behaviours while achieving the repository scoped access.

Suggested-by: Phillip Wood <phillip.wood123@gmail.com>
Mentored-by: Christian Couder <christian.couder@gmail.com>
Mentored-by: Usman Akinyemi <usmanakinyemi202@gmail.com>
Signed-off-by: Olamide Caleb Bello <belkid98@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 files changed:
builtin/backfill.c
builtin/clone.c
builtin/grep.c
builtin/mv.c
builtin/sparse-checkout.c
builtin/worktree.c
dir.c
environment.c
environment.h
sparse-index.c
unpack-trees.c
wt-status.c