Re: [Outreachy PATCH v3 3/3] environment: move "branch.autoSetupMerge" into `struct repo_config_values`
- From
- Phillip Wood <phillip.wood123@gmail.com>
- Date
- Jan 22, 2026, 14:41 UTC
- Message-ID
- <56ac85bc-8e12-4cb9-ba22-db021c473110@gmail.com>
- In-Reply-To
- <9a411db9f8f9df37c7a5f100d97c8d5ff5f6ba97.1768681947.git.belkid98@gmail.com>
Hi Olamide
On 17/01/2026 20:59, Olamide Caleb Bello wrote:
Show 7 quoted lines
> The config value `brach.autoSetupMerge` is parsed in > `git_default_branch_config()` and stored in the global variable > `git_branch_track`. This global variable can cause unexpected behaviours > when multiple Git repos run in the the same process. > > Move this value into `struct repo_config_values` to retain current > behaviours while achieving repository scoped access.
Same comment as the previous patch about repository scoped access.
Show 19 quoted lines
> diff --git a/environment.h b/environment.h
> index 3b5ff7094a..bfcdffe836 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 {
> /* core config values */
> char *attributes_file_path;
> int sparse_checkout;
> +
> + /* branch config values */
> + enum branch_track git_branch_track;We could probably drop the "git_" prefix now that it is not a global variable.
Thanks
Phillip