diff options
| author | Olamide Caleb Bello <belkid98@gmail.com> | 2026-02-16 17:38:26 +0100 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2026-02-26 07:22:51 -0800 |
| commit | 4021751558126d39b642503e7ef4768131df45e7 (patch) | |
| tree | 9ba6735a46894f0f969247b3c4f7261038dd468d /environment.h | |
| parent | f9b3c1f731dd12144cd6d1e27787e99beb3a631f (diff) | |
| download | git-4021751558126d39b642503e7ef4768131df45e7.tar.xz | |
environment: stop using core.sparseCheckout globally
The config value `core.sparseCheckout` is parsed in
`git_default_core_config()` and stored globally in
`core_apply_sparse_checkout`. This could cause it to be overwritten
by another repository when different Git repositories run in the same
process.
Move the parsed value into `struct repo_config_values` in the_repository
to retain current behaviours and move towards libifying Git.
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>
Diffstat (limited to 'environment.h')
| -rw-r--r-- | environment.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/environment.h b/environment.h index dfc31b794d..2e24160322 100644 --- a/environment.h +++ b/environment.h @@ -88,6 +88,7 @@ struct repository; struct repo_config_values { /* section "core" config values */ char *attributes_file; + int apply_sparse_checkout; }; struct repo_config_values *repo_config_values(struct repository *repo); @@ -171,7 +172,6 @@ extern int precomposed_unicode; extern int protect_hfs; extern int protect_ntfs; -extern int core_apply_sparse_checkout; extern int core_sparse_checkout_cone; extern int sparse_expect_files_outside_of_patterns; |
