]> Kevux Git Server - rit/commit
environment: move "check_stat" into `struct repo_config_values`
authorOlamide Caleb Bello <belkid98@gmail.com>
Tue, 2 Jun 2026 17:09:15 +0000 (18:09 +0100)
committerJunio C Hamano <gitster@pobox.com>
Tue, 2 Jun 2026 23:36:48 +0000 (08:36 +0900)
commit88505ed63711eca184409dfd949437c7e41f994e
tree1b0ceea403f54c60f6690c2009237df1e26488c4
parent18684282df3e05db3ed9b3cdafc86c97285e4fd4
environment: move "check_stat" into `struct repo_config_values`

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

Store it instead in `repo_config_values`, where eagerly‑parsed
repository configuration lives. `core.checkstat` is parsed eagerly
because it controls how `match_stat_data()` and related functions
decide file freshness; a lazy parse could lead to unexpected
behavior or complicate libification. This preserves the existing
eager‑parsing behavior while tying the value to the repository it
was read from, 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>
entry.c
environment.c
environment.h
statinfo.c