Skip to content

Commit 474668c

Browse files
committed
fixup! mingw: allow git.exe to be used instead of the "Git wrapper"
When building Git via CMake on Windows, the dynamic libraries (`.dll` files) on which Git's executables depend are copied into the build directory, because the `.exe` files would not even load otherwise. The "'MSYSTEM/PATH is adjusted if necessary'" test case of `t0060-path-utils.sh` wants to copy said `.exe` files, though, and expects them to run. Therefore, we need to copy the `.dll` files, too, if there are any. Signed-off-by: Johannes Schindelin <[email protected]>
1 parent 6e26de9 commit 474668c

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

t/t0060-path-utils.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -566,6 +566,14 @@ test_expect_success MINGW 'MSYSTEM/PATH is adjusted if necessary' '
566566
pretend/mingw64/libexec/git-core pretend/usr/bin &&
567567
cp "$GIT_EXEC_PATH"/git.exe pretend/mingw64/bin/ &&
568568
cp "$GIT_EXEC_PATH"/git.exe pretend/mingw64/libexec/git-core/ &&
569+
# copy the .dll files, if any (happens when building via CMake)
570+
case "$GIT_EXEC_PATH"/*.dll in
571+
*/"*.dll") ;; # no `.dll` files to be copied
572+
*)
573+
cp "$GIT_EXEC_PATH"/*.dll pretend/mingw64/bin/ &&
574+
cp "$GIT_EXEC_PATH"/*.dll pretend/mingw64/libexec/git-core/
575+
;;
576+
esac &&
569577
echo "env | grep MSYSTEM=" | write_script "$HOME"/bin/git-test-home &&
570578
echo "echo mingw64" | write_script pretend/mingw64/bin/git-test-bin &&
571579
echo "echo usr" | write_script pretend/usr/bin/git-test-bin2 &&

0 commit comments

Comments
 (0)