From: Olamide Caleb Bello Date: Mon, 12 Jan 2026 12:59:22 GMT Subject: [Outreachy PATCH RFC 0/3] store git_default_config() parsed values in new config struct Message-ID: Hi Git Community, Over the course of my ongoing internship, which focused on moving global variables in environment.h into local scope, I have attempted to move some variables into the struct repo-settings. However there have been some design concerns as regards the use of `prepare_repo_settings()` with respect to when and where to call the function, and also the change in behaviours when the variable is lazily loaded as discussed in [1] and [2]. After different deliberations, Phillip Wood proposed creating a new config struct [3], adding it to the repository struct and passing the repo struct to `git_default_config()` to store the parsed config values per repo. This would mean we would not need to remove code from `git_default_config()`, and hence the current behaviours will be retained. I have experimented with this approach for some values and I would appreciate feedbacks about this approach before we can move forward and use it for more variables related to `git_default_config()`. For now, the parsed value is stored in `the_repository` in `git_default_*_config()` and further efforts to pass the repository parameter to `git_default_config()` as the callback parameter will be looked into later on. 1. https://lore.kernel.org/git/43aaec10-2696-44c9-8728-2045b83dc5d3@gmail.com/ 2. https://lore.kernel.org/git/a881499d-e236-4f8e-a217-b6bce69e3e3c@gmail.com/ 3. https://lore.kernel.org/git/8899016f-eeef-404b-8da6-ff3a90e81cea@gmail.com/ Olamide Caleb Bello (3): environment: stop storing `core.attributesFile` globally environment: stop using core.sparseCheckout globally environment: move "branch.autoSetupMerge" into `struct config_values` attr.c | 8 +++++--- builtin/backfill.c | 3 +-- builtin/branch.c | 2 +- builtin/checkout.c | 2 +- builtin/clone.c | 2 +- builtin/mv.c | 2 +- builtin/push.c | 2 +- builtin/sparse-checkout.c | 22 +++++++++++----------- builtin/submodule--helper.c | 2 +- builtin/worktree.c | 2 +- config.c | 10 ++++++++++ config.h | 13 +++++++++++++ dir.c | 2 +- environment.c | 20 ++++++++++---------- environment.h | 2 -- repository.c | 7 +++++++ repository.h | 4 ++++ sparse-index.c | 4 ++-- unpack-trees.c | 2 +- wt-status.c | 3 ++- 20 files changed, 74 insertions(+), 40 deletions(-) -- 2.34.1