diff options
author | Junio C Hamano <gitster@pobox.com> | 2021-07-16 17:42:46 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2021-07-16 17:42:46 -0700 |
commit | bc34e5227b683c5bb0a85211354f5eb3ccd8cc19 (patch) | |
tree | 55c3396e3dfff93f2122eddbf1c66703bd59da1e /config.c | |
parent | Merge branch 'ks/submodule-cleanup' (diff) | |
parent | config: normalize the path of the system gitconfig (diff) | |
download | tgif-bc34e5227b683c5bb0a85211354f5eb3ccd8cc19.tar.xz |
Merge branch 'js/gfw-system-config-loc-fix'
Update the location of system-side configuration file on Windows.
* js/gfw-system-config-loc-fix:
config: normalize the path of the system gitconfig
cmake(windows): set correct path to the system Git config
mingw: move Git for Windows' system config where users expect it
Diffstat (limited to 'config.c')
-rw-r--r-- | config.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -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) |