From d8e1ba5c4d6f178d9322d8007130eb88b2d35c45 Mon Sep 17 00:00:00 2001 From: Patrick Steinhardt Date: Thu, 24 Sep 2026 16:09:10 +0200 Subject: [PATCH 1/7] meson: avoid recompiling HTTP sources several times MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We only link curl into a subset of our subcommands. Consequently, as both "http.c" and "http-walker.c" depend on curl, we don't compile these into "libgit.a" but instead only link those into the commands that depend on curl. In Meson, we wire these dependencies into the target executables by using the `sources:` keyword. But this has the consequence that we're recompiling those multiple several times, once for every different command they are linked into. In fact, each of these sources is compiled seven times, which of course has an impact on compilation speed. Fix this issue by instead linking these into a static library so that they only need to be compiled once. This gives us an almost 10% speedup in a clean build: Benchmark 1: meson compile (version = HEAD~) Time (mean ± σ): 6.781 s ± 0.052 s [User: 100.775 s, System: 22.954 s] Range (min … max): 6.709 s … 6.867 s 10 runs Benchmark 2: meson compile (version = HEAD) Time (mean ± σ): 6.274 s ± 0.021 s [User: 91.882 s, System: 22.092 s] Range (min … max): 6.242 s … 6.306 s 10 runs Summary meson compile (version = HEAD) ran 1.08 ± 0.01 times faster than meson compile (version = HEAD~) Signed-off-by: Patrick Steinhardt Signed-off-by: Junio C Hamano --- meson.build | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 0a95d90d21..4fdb4c5405 100644 --- a/meson.build +++ b/meson.build @@ -1925,10 +1925,13 @@ bin_wrappers += executable('scalar', if curl.found() libgit_curl = declare_dependency( - sources: [ - 'http.c', - 'http-walker.c', - ], + link_with: static_library('git-curl', + sources: [ + 'http.c', + 'http-walker.c', + ], + dependencies: [libgit_commonmain, curl], + ), dependencies: [libgit_commonmain, curl], ) From cc839e97a3dc15cbe280303d397f3c471801eebe Mon Sep 17 00:00:00 2001 From: Patrick Steinhardt Date: Thu, 24 Sep 2026 16:09:11 +0200 Subject: [PATCH 2/7] meson: don't recompile git-remote-http(1) multiple times for tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When running our tests, we expect git-remote-http(1) and a couple of other binaries to be available to the test suite. In our Makefile, we achieve this by simply hardlinking the file into place in our source directory. We cannot easily do that in Meson though because there is no available command to create such a hardlink. We could of course create a custom target that uses a script for that, but that feels quite awkward. Instead, we build the executable several times, which is of course less efficient. Even worse though, similar as in the preceding commit, we're building "remote-curl.c" once for each of these targets, which makes this even more expensive. Fix this by reusing the already-compiled objects from git-remote-http(1) so that we only have to perform the linking step several times. This leads to a mild speedup: Benchmark 1: meson compile (version = HEAD~) Time (mean ± σ): 6.250 s ± 0.040 s [User: 90.881 s, System: 21.912 s] Range (min … max): 6.197 s … 6.344 s 10 runs Benchmark 2: meson compile (version = HEAD) Time (mean ± σ): 6.218 s ± 0.029 s [User: 90.633 s, System: 22.022 s] Range (min … max): 6.166 s … 6.262 s 10 runs Summary meson compile (version = HEAD) ran 1.01 ± 0.01 times faster than meson compile (version = HEAD~) Honestly, a 1% speedup isn't really worth it. But the change makes sense anyway, as we're doing the same when we build git-receive-pack(1) et al. So while the speed improvement is negligible, it brings more consistency into our build instructions. For the record: I also had a look at using a custom target that hardlinks the files into place. But the improvement it had on our build times were not that mindblowing either, saving roundabout ~100ms in wall time. So sticking with the status quo felt like the better solution as it is native to Meson. Signed-off-by: Patrick Steinhardt Signed-off-by: Junio C Hamano --- meson.build | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/meson.build b/meson.build index 4fdb4c5405..fa104a3efd 100644 --- a/meson.build +++ b/meson.build @@ -1935,12 +1935,13 @@ if curl.found() dependencies: [libgit_commonmain, curl], ) - test_dependencies += executable('git-remote-http', + git_remote_http = executable('git-remote-http', sources: 'remote-curl.c', dependencies: [libgit_curl], install: true, install_dir: git_exec_path, ) + test_dependencies += git_remote_http test_dependencies += executable('git-http-fetch', sources: 'http-fetch.c', @@ -1960,7 +1961,7 @@ if curl.found() foreach alias : [ 'git-remote-https', 'git-remote-ftp', 'git-remote-ftps' ] test_dependencies += executable(alias, - sources: 'remote-curl.c', + objects: git_remote_http.extract_all_objects(recursive: false), dependencies: [libgit_curl], ) From ae24379dd46b92734043ddcec47079f26afe3d3a Mon Sep 17 00:00:00 2001 From: Patrick Steinhardt Date: Thu, 24 Sep 2026 16:09:12 +0200 Subject: [PATCH 3/7] meson: use precompiled headers for our test-helper MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In 671df48df8 (meson: precompile "git-compat-util.h", 2026-03-19) we have introduced support for precompiled headers into Meson. At that time though we only converted "libgit.a" to make use of those. Nowadays though, our test-helper also consists of a bunch of code files, and all of these include "git-compat-util.h" via "test-tool.h" as the first header. So they're a natural target to also use precompiled headers. Adapt the test-tool executable to make use of them, which results in a surprisingly large speedup for clean builds: Benchmark 1: meson compile (version = HEAD~) Time (mean ± σ): 6.363 s ± 0.033 s [User: 92.858 s, System: 22.500 s] Range (min … max): 6.311 s … 6.418 s 10 runs Benchmark 2: meson compile (version = HEAD) Time (mean ± σ): 5.327 s ± 0.021 s [User: 75.135 s, System: 20.373 s] Range (min … max): 5.299 s … 5.362 s 10 runs Summary meson compile (version = HEAD) ran 1.19 ± 0.01 times faster than meson compile (version = HEAD~) Signed-off-by: Patrick Steinhardt Signed-off-by: Junio C Hamano --- t/helper/meson.build | 1 + 1 file changed, 1 insertion(+) diff --git a/t/helper/meson.build b/t/helper/meson.build index 3235f10ab8..ae513b4cdc 100644 --- a/t/helper/meson.build +++ b/t/helper/meson.build @@ -83,6 +83,7 @@ test_tool_sources = [ test_tool = executable('test-tool', sources: test_tool_sources, + c_pch: '../../tools/precompiled.h', dependencies: [libgit_commonmain], ) bin_wrappers += test_tool From 3d7418e351a2c50bcf804b8d57a4a442757fb8a5 Mon Sep 17 00:00:00 2001 From: Patrick Steinhardt Date: Thu, 24 Sep 2026 16:09:13 +0200 Subject: [PATCH 4/7] meson: use precompiled headers for unit tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Same as in the preceding commit, our unit tests don't use precompiled headers yet. In this case though it's a tiny bit more complicated to make use of them, as we do not want to include "git-compat-util.h" for "clar.c", as that code file is a third-party implementation that is independent of the Git codebase. But there's an easy workaround: instead of linking that file into the executable directly, we can easily adapt it to be built into a static library first. Like that we can trivially have separate build flags for that one file. Do so and adapt the remaining sources to use precompiled headers. This results in a small but noticeable build speedup: Benchmark 1: meson compile (version = HEAD~) Time (mean ± σ): 5.343 s ± 0.019 s [User: 75.478 s, System: 20.382 s] Range (min … max): 5.308 s … 5.376 s 10 runs Benchmark 2: meson compile (version = HEAD) Time (mean ± σ): 5.077 s ± 0.017 s [User: 70.557 s, System: 19.999 s] Range (min … max): 5.047 s … 5.103 s 10 runs Summary meson compile (version = HEAD) ran 1.05 ± 0.01 times faster than meson compile (version = HEAD~) Signed-off-by: Patrick Steinhardt Signed-off-by: Junio C Hamano --- t/meson.build | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/t/meson.build b/t/meson.build index 3ca7b27104..9f1ee9ad59 100644 --- a/t/meson.build +++ b/t/meson.build @@ -30,7 +30,6 @@ clar_test_suites = [ ] clar_sources = [ - 'unit-tests/clar/clar.c', 'unit-tests/unit-test.c', 'unit-tests/lib-oid.c', 'unit-tests/lib-reftable.c' @@ -49,7 +48,7 @@ clar_decls_h = custom_target( ) clar_sources += clar_decls_h -clar_sources += custom_target( +clar_suite_h = custom_target( input: clar_decls_h, output: 'clar.suite', command : [ @@ -66,6 +65,13 @@ clar_unit_tests = executable('unit-tests', c_args: [ '-DGIT_CLAR_DECLS_H="' + clar_decls_h.full_path() + '"', ], + c_pch: '../tools/precompiled.h', + link_with: static_library('clar', + sources: [ + 'unit-tests/clar/clar.c', + clar_suite_h, + ], + ), dependencies: [libgit_commonmain], ) test('unit-tests', clar_unit_tests, kwargs: test_kwargs) From 47780704699b83a54caa23e0e69c1e3af84c49d2 Mon Sep 17 00:00:00 2001 From: Patrick Steinhardt Date: Thu, 24 Sep 2026 16:09:14 +0200 Subject: [PATCH 5/7] meson: fix outdated completion helpers When using Meson 1.3.0 or newer, we use `fs.copyfile()` to put our completion helpers into the expected location so that our test suite can find these scripts. Naturally, we thus also add these scripts to our test dependencies so that we know to build them before executing tests. But there's an issue here: we include the "contrib/completion" subdir after we have already wired up our tests, so any dependencies we add here are not being honored correctly. This has the consequence that we don't know to copy around these completion helpers when we execute tests, and one has to manually `meson compile` beforehand. The interesting part here is that the code path we use with older versions of Meson don't suffer from the same problem as they use `configure_file()`, and that function will always run whenever the source file changes. It's conceptually correct to use `fs.copyfile()` instead, but given that it's mostly creating problems for us it does not really seem sensible to continue using it. Adapt the build instructions to unconditionally use `configure_file()` to fix this issue. A better fix would arguably be to promote our shell completion helpers out of "contrib/" -- they are an important part of Git nowadays, and these helpers get installed on lots of platforms. If so, we could also fix the order of subdir includes so that test dependencies are properly honored. But that feels like a bigger change, so that's left for a future patch series. Signed-off-by: Patrick Steinhardt Signed-off-by: Junio C Hamano --- contrib/completion/meson.build | 38 ++++++++++++++-------------------- 1 file changed, 15 insertions(+), 23 deletions(-) diff --git a/contrib/completion/meson.build b/contrib/completion/meson.build index 576125b083..4483c5be3e 100644 --- a/contrib/completion/meson.build +++ b/contrib/completion/meson.build @@ -4,31 +4,23 @@ foreach script : [ 'git-completion.zsh', 'git-prompt.sh' ] - if meson.version().version_compare('>=1.3.0') - test_dependencies += fs.copyfile(script) - else - configure_file( - input: script, - output: script, - copy: true, - ) - endif + # Note that we intentionally don't use `fs.copyfile()` here because we'd have + # to add it to our test dependencies in that case, but that creates a + # chicken-and-egg situation between including "t/" or "contrib/" first. + configure_file( + input: script, + output: script, + copy: true, + ) endforeach # We have to discern between the test dependency and the installed file. Our # tests assume the completion scripts to have the same name as the in-tree # files, but the installed filenames need to match the executable's basename. -if meson.version().version_compare('>=1.3.0') - fs.copyfile('git-completion.bash', 'git', - install: true, - install_dir: get_option('datadir') / 'bash-completion/completions', - ) -else - configure_file( - input: 'git-completion.bash', - output: 'git', - copy: true, - install: true, - install_dir: get_option('datadir') / 'bash-completion/completions', - ) -endif +configure_file( + input: 'git-completion.bash', + output: 'git', + copy: true, + install: true, + install_dir: get_option('datadir') / 'bash-completion/completions', +) From e492974847e182abc111506c0d2c1efd454e9686 Mon Sep 17 00:00:00 2001 From: Patrick Steinhardt Date: Thu, 24 Sep 2026 16:09:15 +0200 Subject: [PATCH 6/7] meson: update wrappers Our subproject wrappers are used on platforms that do not have the respective dependencies available. Most importantly, this can be used on Windows to have an almost-dependency-free build of Git. Update these wrappers via `meson wrap update`. Signed-off-by: Patrick Steinhardt Signed-off-by: Junio C Hamano --- subprojects/curl.wrap | 19 ++++++++++--------- subprojects/expat.wrap | 21 +++++++++++---------- subprojects/openssl.wrap | 23 +++++++++++------------ subprojects/pcre2.wrap | 24 +++++++++++------------- subprojects/zlib.wrap | 21 +++++++++++---------- 5 files changed, 54 insertions(+), 54 deletions(-) diff --git a/subprojects/curl.wrap b/subprojects/curl.wrap index f7e384b85c..d73b88b75e 100644 --- a/subprojects/curl.wrap +++ b/subprojects/curl.wrap @@ -1,13 +1,14 @@ [wrap-file] -directory = curl-8.10.1 -source_url = https://github.com/curl/curl/releases/download/curl-8_10_1/curl-8.10.1.tar.xz -source_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/curl_8.10.1-1/curl-8.10.1.tar.xz -source_filename = curl-8.10.1.tar.xz -source_hash = 73a4b0e99596a09fa5924a4fb7e4b995a85fda0d18a2c02ab9cf134bebce04ee -patch_filename = curl_8.10.1-1_patch.zip -patch_url = https://wrapdb.mesonbuild.com/v2/curl_8.10.1-1/get_patch -patch_hash = 707c28f35fc9b0e8d68c0c2800712007612f922a31da9637ce706a2159f3ddd8 -wrapdb_version = 8.10.1-1 +directory = curl-8.12.1 +source_url = https://github.com/curl/curl/releases/download/curl-8_12_1/curl-8.12.1.tar.xz +source_fallback_url = https://wrapdb.mesonbuild.com/v2/curl_8.12.1-2/get_source/curl-8.12.1.tar.xz +source_filename = curl-8.12.1.tar.xz +source_hash = 0341f1ed97a26c811abaebd37d62b833956792b7607ea3f15d001613c76de202 +patch_filename = curl_8.12.1-2_patch.zip +patch_url = https://wrapdb.mesonbuild.com/v2/curl_8.12.1-2/get_patch +patch_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/curl_8.12.1-2/curl_8.12.1-2_patch.zip +patch_hash = bfd8886cc76ccfab52b1b0472e6c682cdf5374a4c30be2427326f2f495de4eba +wrapdb_version = 8.12.1-2 [provide] dependency_names = libcurl diff --git a/subprojects/expat.wrap b/subprojects/expat.wrap index 0e9292f97b..67c4ae872f 100644 --- a/subprojects/expat.wrap +++ b/subprojects/expat.wrap @@ -1,13 +1,14 @@ [wrap-file] -directory = expat-2.7.1 -source_url = https://github.com/libexpat/libexpat/releases/download/R_2_7_1/expat-2.7.1.tar.xz -source_filename = expat-2.7.1.tar.bz2 -source_hash = 354552544b8f99012e5062f7d570ec77f14b412a3ff5c7d8d0dae62c0d217c30 -patch_filename = expat_2.7.1-1_patch.zip -patch_url = https://wrapdb.mesonbuild.com/v2/expat_2.7.1-1/get_patch -patch_hash = fe28cbbc427a7c9787d08b969ad54d19f59d8dd18294b4a18651cecfc789d4ef -source_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/expat_2.7.1-1/expat-2.7.1.tar.bz2 -wrapdb_version = 2.7.1-1 +directory = expat-2.8.4 +source_url = https://github.com/libexpat/libexpat/releases/download/R_2_8_4/expat-2.8.4.tar.xz +source_filename = expat-2.8.4.tar.xz +source_hash = 656ae1cc8da3b4ea513bb4e254f33e6243938084c0ec6239da873376b09985a7 +source_fallback_url = https://wrapdb.mesonbuild.com/v2/expat_2.8.4-1/get_source/expat-2.8.4.tar.xz +patch_filename = expat_2.8.4-1_patch.zip +patch_url = https://wrapdb.mesonbuild.com/v2/expat_2.8.4-1/get_patch +patch_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/expat_2.8.4-1/expat_2.8.4-1_patch.zip +patch_hash = 221c537a6cfd8d55ea2d41600ee7f32d8c0659cf6e41511e9e7a2f294b21cb92 +wrapdb_version = 2.8.4-1 [provide] -expat = expat_dep +dependency_names = expat diff --git a/subprojects/openssl.wrap b/subprojects/openssl.wrap index 873d55106e..e775bb104f 100644 --- a/subprojects/openssl.wrap +++ b/subprojects/openssl.wrap @@ -1,15 +1,14 @@ [wrap-file] -directory = openssl-3.0.8 -source_url = https://www.openssl.org/source/openssl-3.0.8.tar.gz -source_filename = openssl-3.0.8.tar.gz -source_hash = 6c13d2bf38fdf31eac3ce2a347073673f5d63263398f1f69d0df4a41253e4b3e -patch_filename = openssl_3.0.8-3_patch.zip -patch_url = https://wrapdb.mesonbuild.com/v2/openssl_3.0.8-3/get_patch -patch_hash = 300da189e106942347d61a4a4295aa2edbcf06184f8d13b4cee0bed9fb936963 -source_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/openssl_3.0.8-3/openssl-3.0.8.tar.gz -wrapdb_version = 3.0.8-3 +directory = openssl-3.0.10 +source_url = https://www.openssl.org/source/openssl-3.0.10.tar.gz +source_filename = openssl-3.0.10.tar.gz +source_hash = 1761d4f5b13a1028b9b6f3d4b8e17feb0cedc9370f6afe61d7193d2cdce83323 +source_fallback_url = https://wrapdb.mesonbuild.com/v2/openssl_3.0.10-1/get_source/openssl-3.0.10.tar.gz +patch_filename = openssl_3.0.10-1_patch.zip +patch_url = https://wrapdb.mesonbuild.com/v2/openssl_3.0.10-1/get_patch +patch_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/openssl_3.0.10-1/openssl_3.0.10-1_patch.zip +patch_hash = 2d142b7e3b1ac092cf67cb4891594c4a2d044aa92624c617a8dcbfe4f056d907 +wrapdb_version = 3.0.10-1 [provide] -libcrypto = libcrypto_dep -libssl = libssl_dep -openssl = openssl_dep +dependency_names = libcrypto, libssl, openssl diff --git a/subprojects/pcre2.wrap b/subprojects/pcre2.wrap index f45c968e2f..a2ff6268dc 100644 --- a/subprojects/pcre2.wrap +++ b/subprojects/pcre2.wrap @@ -1,16 +1,14 @@ [wrap-file] -directory = pcre2-10.45 -source_url = https://github.com/PCRE2Project/pcre2/releases/download/pcre2-10.45/pcre2-10.45.tar.bz2 -source_filename = pcre2-10.45.tar.bz2 -source_hash = 21547f3516120c75597e5b30a992e27a592a31950b5140e7b8bfde3f192033c4 -patch_filename = pcre2_10.45-2_patch.zip -patch_url = https://wrapdb.mesonbuild.com/v2/pcre2_10.45-2/get_patch -patch_hash = 7c6f34b703708652a404f9dc2769c67658c437b6043573295fa3428a9b7a6807 -source_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/pcre2_10.45-2/pcre2-10.45.tar.bz2 -wrapdb_version = 10.45-2 +directory = pcre2-10.48 +source_url = https://github.com/PCRE2Project/pcre2/releases/download/pcre2-10.48/pcre2-10.48.tar.bz2 +source_filename = pcre2-10.48.tar.bz2 +source_hash = b6c68fdf6f3ac31388b50aa89ff0fc49c00c987c16e7b5146491d12003f2c8ed +source_fallback_url = https://wrapdb.mesonbuild.com/v2/pcre2_10.48-1/get_source/pcre2-10.48.tar.bz2 +patch_filename = pcre2_10.48-1_patch.zip +patch_url = https://wrapdb.mesonbuild.com/v2/pcre2_10.48-1/get_patch +patch_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/pcre2_10.48-1/pcre2_10.48-1_patch.zip +patch_hash = fbcc964804a921b02ea78fc0ff1558d5999b224db8361087828e30012023525c +wrapdb_version = 10.48-1 [provide] -libpcre2-8 = libpcre2_8 -libpcre2-16 = libpcre2_16 -libpcre2-32 = libpcre2_32 -libpcre2-posix = libpcre2_posix +dependency_names = libpcre2-8, libpcre2-16, libpcre2-32, libpcre2-posix diff --git a/subprojects/zlib.wrap b/subprojects/zlib.wrap index aa14de1774..0626401ac2 100644 --- a/subprojects/zlib.wrap +++ b/subprojects/zlib.wrap @@ -1,13 +1,14 @@ [wrap-file] -directory = zlib-1.3.1 -source_url = http://zlib.net/fossils/zlib-1.3.1.tar.gz -source_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/zlib_1.3.1-1/zlib-1.3.1.tar.gz -source_filename = zlib-1.3.1.tar.gz -source_hash = 9a93b2b7dfdac77ceba5a558a580e74667dd6fede4585b91eefb60f03b72df23 -patch_filename = zlib_1.3.1-1_patch.zip -patch_url = https://wrapdb.mesonbuild.com/v2/zlib_1.3.1-1/get_patch -patch_hash = e79b98eb24a75392009cec6f99ca5cdca9881ff20bfa174e8b8926d5c7a47095 -wrapdb_version = 1.3.1-1 +directory = zlib-1.3.2 +source_url = https://zlib.net/zlib-1.3.2.tar.xz +source_fallback_url = https://wrapdb.mesonbuild.com/v2/zlib_1.3.2-1/get_source/zlib-1.3.2.tar.xz +source_filename = zlib-1.3.2.tar.xz +source_hash = d7a0654783a4da529d1bb793b7ad9c3318020af77667bcae35f95d0e42a792f3 +patch_filename = zlib_1.3.2-1_patch.zip +patch_url = https://wrapdb.mesonbuild.com/v2/zlib_1.3.2-1/get_patch +patch_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/zlib_1.3.2-1/zlib_1.3.2-1_patch.zip +patch_hash = 5ae7a2e92f823df118cfb8c1b23d94e3117864392b3446581d669049b2fba6dd +wrapdb_version = 1.3.2-1 [provide] -zlib = zlib_dep +dependency_names = zlib From ce4a600322fa2c302e354755f9331f04d4242edd Mon Sep 17 00:00:00 2001 From: Patrick Steinhardt Date: Thu, 24 Sep 2026 16:09:16 +0200 Subject: [PATCH 7/7] gitlab-ci: fix hanging MSVC jobs Starting with GitLab Runner 19.x, the runner executes `git credential reject` in its cleanup stage. This has bad interactions with our build environment because we install our own version of PortableGit, and the runner picks up that version of Git. The consequence is that we invoke PortableGit's default credential manager, which is Git Credential Manager for Windows. GCM then tries to use Windows Credential Manager, but it cannot and thus the job hangs in its cleanup phase forever. Fix this hang by unsetting the credential helper after installing PortableGit. This means that `git credential reject` becomes a no-op, and thus the cleanup succeeds again. Signed-off-by: Patrick Steinhardt Signed-off-by: Junio C Hamano --- ci/install-dependencies.ps1 | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/ci/install-dependencies.ps1 b/ci/install-dependencies.ps1 index e3b367fa54..2ceb5dd99a 100755 --- a/ci/install-dependencies.ps1 +++ b/ci/install-dependencies.ps1 @@ -53,3 +53,11 @@ Invoke-Installer msiexec.exe @('/i', $mesonMsi, 'INSTALLDIR=C:\Meson', '/quiet', $rustMsi = Get-Installer "rust.msi" ` "https://static.rust-lang.org/dist/rust-$RustVersion-x86_64-pc-windows-msvc.msi" Invoke-Installer msiexec.exe @('/i', $rustMsi, 'INSTALLDIR=C:\Rust', 'ADDLOCAL=Rustc,Cargo,Std', '/quiet', '/norestart') + +# Disable Git Credential Manager, which is auto-configured by PortableGit. +# GitLab's runner picks up this Git in its cleanup stage and runs `git +# credential reject`, which hangs in GCM and makes the job time out. +& "C:\Program Files\Git\bin\git.exe" config unset --all --system credential.helper +if ($LASTEXITCODE -ne 0 -and $LASTEXITCODE -ne 5) { + throw "Failed to unset credential.helper with exit code $LASTEXITCODE" +}