From cf50830ce1d1b95a44f9d095ff868e7df1495863 Mon Sep 17 00:00:00 2001 From: Olamide Caleb Bello Date: Mon, 16 Feb 2026 17:38:27 +0100 Subject: environment: move "branch.autoSetupMerge" into `struct repo_config_values` The config value `branch.autoSetupMerge` is parsed in `git_default_branch_config()` and stored in the global variable `git_branch_track`. This global variable can be overwritten by another repository when multiple Git repos run in the the same process. Move this value into `struct repo_config_values` in the_repository to retain current behaviours and move towards libifying Git. Since the variable is no longer a global variable, it has been renamed to `branch_track` in the struct `repo_config_values`. Suggested-by: Phillip Wood Mentored-by: Christian Couder Mentored-by: Usman Akinyemi Signed-off-by: Olamide Caleb Bello Signed-off-by: Junio C Hamano --- environment.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'environment.h') diff --git a/environment.h b/environment.h index 2e24160322..4bfd798757 100644 --- a/environment.h +++ b/environment.h @@ -2,6 +2,7 @@ #define ENVIRONMENT_H #include "repo-settings.h" +#include "branch.h" /* Double-check local_repo_env below if you add to this list. */ #define GIT_DIR_ENVIRONMENT "GIT_DIR" @@ -89,6 +90,9 @@ struct repo_config_values { /* section "core" config values */ char *attributes_file; int apply_sparse_checkout; + + /* section "branch" config values */ + enum branch_track branch_track; }; struct repo_config_values *repo_config_values(struct repository *repo); -- cgit v1.3