Skip to content

Draft: t7300: work around platform-specific behaviour with long paths on MinGW

The is_bare_repository_cfg global variable is used for storing a bare repository setting, either through the config, an env var, or the commandline. This variable is global, and hence introduces global state everywhere it is used.

In order to reduce global state, add a member to the repository struct to keep track of the setting there. For now, the_repository is what's used to set the member, which still represents global state. However, there is a parallel effort to replace calls to the_repository with a repository struct that is passed into builtins, see [1]. Hence, this change will help the overall effort in reducing global state.

  1. 9b1cb507 (builtin: add a repository parameter for builtin functions, Fri Sep 13 21:16:14 2024 +0000)

Signed-off-by: John Cai johncai86@gmail.com

Merge request reports

Loading