Skip to content

Commit 17832ec

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 dab05a0 commit 17832ec

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
@@ -565,6 +565,14 @@ test_expect_success MINGW 'MSYSTEM/PATH is adjusted if necessary' '
565565
pretend/mingw64/libexec/git-core pretend/usr/bin &&
566566
cp "$GIT_EXEC_PATH"/git.exe pretend/mingw64/bin/ &&
567567
cp "$GIT_EXEC_PATH"/git.exe pretend/mingw64/libexec/git-core/ &&
568+
# copy the .dll files, if any (happens when building via CMake)
569+
case "$GIT_EXEC_PATH"/*.dll in
570+
*/"*.dll") ;; # no `.dll` files to be copied
571+
*)
572+
cp "$GIT_EXEC_PATH"/*.dll pretend/mingw64/bin/ &&
573+
cp "$GIT_EXEC_PATH"/*.dll pretend/mingw64/libexec/git-core/
574+
;;
575+
esac &&
568576
echo "env | grep MSYSTEM=" | write_script "$HOME"/bin/git-test-home &&
569577
echo "echo mingw64" | write_script pretend/mingw64/bin/git-test-bin &&
570578
echo "echo usr" | write_script pretend/usr/bin/git-test-bin2 &&

0 commit comments

Comments
 (0)