]> git.ipfire.org Git - thirdparty/git.git/commit
environment: move "trust_ctime" into `struct repo_config_values`
authorOlamide Caleb Bello <belkid98@gmail.com>
Tue, 2 Jun 2026 17:09:14 +0000 (18:09 +0100)
committerJunio C Hamano <gitster@pobox.com>
Tue, 2 Jun 2026 23:36:48 +0000 (08:36 +0900)
commit18684282df3e05db3ed9b3cdafc86c97285e4fd4
tree08878094d33f98da3eecc29a630748b9cccb07bb
parent94f057755b7941b321fd11fec1b2e3ca5313a4e0
environment: move "trust_ctime" into `struct repo_config_values`

The `core.trustctime` configuration is currently stored in the global
variable `trust_ctime`, which makes it shared across repository
instances in a single process.

Store it instead in `repo_config_values`, where eagerly‑parsed
repository configuration lives. `core.trustctime` is parsed eagerly
because it is used in low‑level stat‑matching functions
(`match_stat_data()`), where a lazy parse could cause unexpected
fatal errors, result in a performance regression and complicate
libification efforts. This preserves that behavior while tying the
value to the repository from which it was read, avoiding cross‑repository
state leakage and continuing the effort to reduce reliance on global
configuration state.

Update all references to use repo_config_values().

Mentored-by: Christian Couder <christian.couder@gmail.com>
Signed-off-by: Olamide Caleb Bello <belkid98@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
environment.c
environment.h
statinfo.c