Re: [Outreachy PATCH v2 1/3] environment: stop storing `core.attributesFile` globally
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jan 13, 2026, 19:26 UTC
- Message-ID
- <xmqqzf6hiab2.fsf@gitster.g>
- In-Reply-To
- <b6f8deaa405a59812265160fe1d41ad515a9f388.1768318762.git.belkid98@gmail.com>
Olamide Caleb Bello <belkid98@gmail.com> writes:
> The config value parsed in git_default_core_config() is loaded eagerly > and stored in the global variable `git_attributes_file`. > Storing this value in a global variable can lead to unexpected > behaviours when more than one Git repository run in the same Git process.
There are quite a many global singleton variables that are accessed by git_default_core_config(), and this patch addresses only one of them. Are most of these variables per repository, or are there some variables that are inherently just one for a user or for a system?
Show 7 quoted lines
> extern int warn_on_object_refname_ambiguity; > extern char *apply_default_whitespace; > extern char *apply_default_ignorewhitespace; > -extern char *git_attributes_file; > extern int zlib_compression_level; > extern int pack_compression_level; > extern unsigned long pack_size_limit_cfg;