git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH v2 3/7] meson: fix MERGE_TOOL_DIR with "--no-bin-wrappers"

From
Patrick Steinhardt <ps@pks.im>
Date
Feb 19, 2026, 06:25 UTC
Message-ID
<20260219-b4-pks-ci-meson-improvements-v2-3-6047b8307ab2@pks.im>
In-Reply-To
<20260219-b4-pks-ci-meson-improvements-v2-0-6047b8307ab2@pks.im>

On Windows, we execute tests with "--no-bin-wrappers". This has been introduced via a87e427e35 (ci: speed up Windows phase, 2019-01-29) to save some time: spawning processes is expensive on Windows, and shell scripts tend to spawn a bunch of them. So overall, the bin-wrappers led to a performance overhead of ~10-30%.

This causes test failures when using Meson on Windows:
  failure: t7610.28 mergetool --tool-help shows recognized tools
    ++ git mergetool --tool-help
    /d/a/git/git/build/git-mergetool--lib: line 45: cd: D:/a/git/git/build/mergetools: No such file or directory

The root cause here is that our bin-wrappers are usually responsible for setting up the `MERGE_TOOL_DIR` environment variable so that we can locate these scripts. But as we don't use the bin-wrappers, we'll instead use the default location for merge tools, which is derived from `GIT_EXEC_PATH`. And as `GIT_EXEC_PATH` points to our build directory, which won't ever contain any of the merge tools, we will fail to locate any of the merge tools.

This issue has went unnoticed for a long time given that we only skip bin-wrappers on Windows, and because the CI jobs on Windows didn't execute due to a bug.

Fix the issue by always setting the `MERGE_TOOL_DIR` environment variable to the correct directory.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
---
 t/meson.build | 1 +
 1 file changed, 1 insertion(+)
diff --git a/t/meson.build b/t/meson.build
index 19e8306298..5ba7efd603 100644
--- a/t/meson.build
+++ b/t/meson.build
@@ -1208,6 +1208,7 @@ endif
 
 test_environment = script_environment
 test_environment.set('GIT_BUILD_DIR', git_build_dir)
+test_environment.set('MERGE_TOOLS_DIR', meson.project_source_root() / 'mergetools')
 
 foreach integration_test : integration_tests
   test(fs.stem(integration_test), shell,
-- 
2.53.0.414.gf7e9f6c205.dirty
Previous: Patrick SteinhardtNext: Patrick Steinhardt
Message 5 of 9 in “Some assorted fixes for GitLab CI”
  1. 0/7 Some assorted fixes for GitLab CIPatrick Steinhardt, Feb 19, 2026
  2. 1/7 ci: handle failures of test-slice helperPatrick Steinhardt, Feb 19, 2026
  3. 2/7 ci: don't skip smallest test slice in GitLabPatrick Steinhardt, Feb 19, 2026
  4. 4/7 github: fix Meson tests not executing at allPatrick Steinhardt, Feb 19, 2026
  5. 3/7 meson: fix MERGE_TOOL_DIR with "--no-bin-wrappers"Patrick Steinhardt, Feb 19, 2026
  6. 5/7 ci: make test slicing consistent across Meson/MakePatrick Steinhardt, Feb 19, 2026
  7. 6/7 gitlab-ci: use "run-test-slice-meson.sh"Patrick Steinhardt, Feb 19, 2026
  8. 7/7 gitlab-ci: handle failed tests on MSVC+Meson jobPatrick Steinhardt, Feb 19, 2026
  9. Junio C HamanoFeb 19, 2026

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.