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,
1833
1833
char * git_system_config (void )
1834
1834
{
1835
1835
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 ;
1839
1840
}
1840
1841
1841
1842
void 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)
437
437
NO_POSIX_GOODIES = UnfortunatelyYes
438
438
NATIVE_CRLF = YesPlease
439
439
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
440
445
441
446
CC = compat/vcbuild/scripts/clink.pl
442
447
AR = compat/vcbuild/scripts/lib.pl
@@ -671,6 +676,11 @@ else
671
676
USE_LIBPCRE= YesPlease
672
677
NO_CURL =
673
678
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
674
684
else
675
685
COMPAT_CFLAGS += -D__USE_MINGW_ANSI_STDIO
676
686
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
223
223
224
224
225
225
add_compile_definitions (PAGER_ENV= "LESS=FRX LV=-c"
226
- ETC_GITATTRIBUTES= "etc/gitattributes"
227
- ETC_GITCONFIG= "etc/gitconfig"
228
226
GIT_EXEC_PATH= "libexec/git-core"
229
227
GIT_LOCALE_PATH= "share/locale"
230
228
GIT_MAN_PATH= "share/man"
@@ -239,10 +237,15 @@ add_compile_definitions(PAGER_ENV="LESS=FRX LV=-c"
239
237
240
238
if (WIN32 )
241
239
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" )
243
244
else ()
244
245
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" )
246
249
endif ()
247
250
248
251
You can’t perform that action at this time.
0 commit comments