summaryrefslogtreecommitdiff
path: root/contrib/buildsystems
diff options
context:
space:
mode:
authorLibravatar Dennis Ameling <dennis@dennisameling.com>2021-06-22 10:46:47 +0000
committerLibravatar Junio C Hamano <gitster@pobox.com>2021-06-28 20:11:50 -0700
commit50101b93ca69babb389e6bdefd733ef014338d29 (patch)
treeeeac3d48e941dc80a9028856fd243c8222e819a3 /contrib/buildsystems
parentmingw: move Git for Windows' system config where users expect it (diff)
downloadtgif-50101b93ca69babb389e6bdefd733ef014338d29.tar.xz
cmake(windows): set correct path to the system Git config
Currently, when Git for Windows is built with CMake, the system Git config is expected in a different location than when building via `make`: the former expects it to be in `<runtime-prefix>/mingw64/etc/gitconfig`, the latter in `<runtime-prefix>/etc/gitconfig`. Because of this, things like `git clone` do not work correctly (because cURL is no longer able to find its certificate bundle that it needs to validate HTTPS certificates). See the full bug report and discussion here: https://github.com/git-for-windows/git/issues/3071#issuecomment-789261386. This commit aligns the CMake-based build by mimicking what is already done in `config.mak.uname`. This closes https://github.com/git-for-windows/git/issues/3071. Signed-off-by: Dennis Ameling <dennis@dennisameling.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'contrib/buildsystems')
-rw-r--r--contrib/buildsystems/CMakeLists.txt11
1 files changed, 7 insertions, 4 deletions
diff --git a/contrib/buildsystems/CMakeLists.txt b/contrib/buildsystems/CMakeLists.txt
index a87841340e..bdc5ab58d0 100644
--- a/contrib/buildsystems/CMakeLists.txt
+++ b/contrib/buildsystems/CMakeLists.txt
@@ -204,8 +204,6 @@ list(APPEND compat_SOURCES sha1dc_git.c sha1dc/sha1.c sha1dc/ubc_check.c block-s
add_compile_definitions(PAGER_ENV="LESS=FRX LV=-c"
- ETC_GITATTRIBUTES="etc/gitattributes"
- ETC_GITCONFIG="etc/gitconfig"
GIT_EXEC_PATH="libexec/git-core"
GIT_LOCALE_PATH="share/locale"
GIT_MAN_PATH="share/man"
@@ -220,10 +218,15 @@ add_compile_definitions(PAGER_ENV="LESS=FRX LV=-c"
if(WIN32)
set(FALLBACK_RUNTIME_PREFIX /mingw64)
- add_compile_definitions(FALLBACK_RUNTIME_PREFIX="${FALLBACK_RUNTIME_PREFIX}")
+ # Move system config into top-level /etc/
+ add_compile_definitions(FALLBACK_RUNTIME_PREFIX="${FALLBACK_RUNTIME_PREFIX}"
+ ETC_GITATTRIBUTES="../etc/gitattributes"
+ ETC_GITCONFIG="../etc/gitconfig")
else()
set(FALLBACK_RUNTIME_PREFIX /home/$ENV{USER})
- add_compile_definitions(FALLBACK_RUNTIME_PREFIX="${FALLBACK_RUNTIME_PREFIX}")
+ add_compile_definitions(FALLBACK_RUNTIME_PREFIX="${FALLBACK_RUNTIME_PREFIX}"
+ ETC_GITATTRIBUTES="etc/gitattributes"
+ ETC_GITCONFIG="etc/gitconfig")
endif()