]> git.ipfire.org Git - thirdparty/git.git/commit
environment: move "trust_ctime" into `struct repo_config_values`
authorOlamide Caleb Bello <belkid98@gmail.com>
Thu, 23 Apr 2026 16:54:25 +0000 (17:54 +0100)
committerJunio C Hamano <gitster@pobox.com>
Sat, 25 Apr 2026 10:35:41 +0000 (19:35 +0900)
commit7d5126d8f1ea08d7af0bf86e6bda962cc183cd1b
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 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>
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>
environment.c
environment.h
statinfo.c