aboutsummaryrefslogtreecommitdiffstats
path: root/environment.c
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2024-09-12 13:30:18 +0200
committerJunio C Hamano <gitster@pobox.com>2024-09-12 10:15:43 -0700
commiteafb126456b235c5281e3ae50bfd526552ce12d3 (patch)
tree24fc4c55c9306970a9336196ba3a32d0cc9e1cea /environment.c
parentrefs: stop modifying global `log_all_ref_updates` variable (diff)
downloadgit-eafb126456b235c5281e3ae50bfd526552ce12d3.tar.gz
git-eafb126456b235c5281e3ae50bfd526552ce12d3.zip
environment: stop storing "core.logAllRefUpdates" globally
The value of "core.logAllRefUpdates" is being stored in the global variable `log_all_ref_updates`. This design is somewhat aged nowadays, where it is entirely possible to access multiple repositories in the same process which all have different values for this setting. So using a single global variable to track it is plain wrong. Remove the global variable. Instead, we now provide a new function part of the repo-settings subsystem that parses the value for a specific repository. While that may require us to read the value multiple times, we work around this by reading it once when the ref backends are set up and caching the value there. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'environment.c')
-rw-r--r--environment.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/environment.c b/environment.c
index 64ae13ef24..992d87e0d6 100644
--- a/environment.c
+++ b/environment.c
@@ -77,7 +77,6 @@ int sparse_expect_files_outside_of_patterns;
int merge_log_config = -1;
int precomposed_unicode = -1; /* see probe_utf8_pathname_composition() */
unsigned long pack_size_limit_cfg;
-enum log_refs_config log_all_ref_updates = LOG_REFS_UNSET;
int max_allowed_tree_depth =
#ifdef _MSC_VER
/*