diff --git a/config.c b/config.c index f9c400ad3062d9..3cd10aeb902840 100644 --- a/config.c +++ b/config.c @@ -1833,9 +1833,10 @@ static int git_config_from_blob_ref(config_fn_t fn, char *git_system_config(void) { char *system_config = xstrdup_or_null(getenv("GIT_CONFIG_SYSTEM")); - if (system_config) - return system_config; - return system_path(ETC_GITCONFIG); + if (!system_config) + system_config = system_path(ETC_GITCONFIG); + normalize_path_copy(system_config, system_config); + return system_config; } void git_global_config(char **user_out, char **xdg_out)