File tree Expand file tree Collapse file tree 3 files changed +21
-7
lines changed
Expand file tree Collapse file tree 3 files changed +21
-7
lines changed Original file line number Diff line number Diff line change @@ -1833,9 +1833,10 @@ static int git_config_from_blob_ref(config_fn_t fn,
18331833char * git_system_config (void )
18341834{
18351835 char * system_config = xstrdup_or_null (getenv ("GIT_CONFIG_SYSTEM" ));
1836- if (system_config )
1837- return system_config ;
1838- return system_path (ETC_GITCONFIG );
1836+ if (!system_config )
1837+ system_config = system_path (ETC_GITCONFIG );
1838+ normalize_path_copy (system_config , system_config );
1839+ return system_config ;
18391840}
18401841
18411842void git_global_config (char * * user_out , char * * xdg_out )
Original file line number Diff line number Diff line change @@ -437,6 +437,11 @@ ifeq ($(uname_S),Windows)
437437 NO_POSIX_GOODIES = UnfortunatelyYes
438438 NATIVE_CRLF = YesPlease
439439 DEFAULT_HELP_FORMAT = html
440+ ifeq (/mingw64,$(subst 32,64,$(prefix)))
441+ # Move system config into top-level /etc/
442+ ETC_GITCONFIG = ../etc/gitconfig
443+ ETC_GITATTRIBUTES = ../etc/gitattributes
444+ endif
440445
441446 CC = compat/vcbuild/scripts/clink.pl
442447 AR = compat/vcbuild/scripts/lib.pl
@@ -671,6 +676,11 @@ else
671676 USE_LIBPCRE= YesPlease
672677 NO_CURL =
673678 USE_NED_ALLOCATOR = YesPlease
679+ ifeq (/mingw64,$(subst 32,64,$(prefix)))
680+ # Move system config into top-level /etc/
681+ ETC_GITCONFIG = ../etc/gitconfig
682+ ETC_GITATTRIBUTES = ../etc/gitattributes
683+ endif
674684 else
675685 COMPAT_CFLAGS += -D__USE_MINGW_ANSI_STDIO
676686 NO_CURL = YesPlease
Original file line number Diff line number Diff line change @@ -223,8 +223,6 @@ list(APPEND compat_SOURCES sha1dc_git.c sha1dc/sha1.c sha1dc/ubc_check.c block-s
223223
224224
225225add_compile_definitions (PAGER_ENV= "LESS=FRX LV=-c"
226- ETC_GITATTRIBUTES= "etc/gitattributes"
227- ETC_GITCONFIG= "etc/gitconfig"
228226 GIT_EXEC_PATH= "libexec/git-core"
229227 GIT_LOCALE_PATH= "share/locale"
230228 GIT_MAN_PATH= "share/man"
@@ -239,10 +237,15 @@ add_compile_definitions(PAGER_ENV="LESS=FRX LV=-c"
239237
240238if (WIN32 )
241239 set (FALLBACK_RUNTIME_PREFIX /mingw64)
242- add_compile_definitions (FALLBACK_RUNTIME_PREFIX= "${FALLBACK_RUNTIME_PREFIX} " )
240+ # Move system config into top-level /etc/
241+ add_compile_definitions (FALLBACK_RUNTIME_PREFIX= "${FALLBACK_RUNTIME_PREFIX} "
242+ ETC_GITATTRIBUTES= "../etc/gitattributes"
243+ ETC_GITCONFIG= "../etc/gitconfig" )
243244else ()
244245 set (FALLBACK_RUNTIME_PREFIX /home/$ENV{USER} )
245- add_compile_definitions (FALLBACK_RUNTIME_PREFIX= "${FALLBACK_RUNTIME_PREFIX} " )
246+ add_compile_definitions (FALLBACK_RUNTIME_PREFIX= "${FALLBACK_RUNTIME_PREFIX} "
247+ ETC_GITATTRIBUTES= "etc/gitattributes"
248+ ETC_GITCONFIG= "etc/gitconfig" )
246249endif ()
247250
248251
You can’t perform that action at this time.
0 commit comments