Skip to content

Commit

Permalink
fixup! mingw: allow git.exe to be used instead of the "Git wrapper"
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
dscho committed Aug 9, 2022
1 parent 5c263f7 commit e051e0b
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions t/t0060-path-utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -565,6 +565,14 @@ test_expect_success MINGW 'MSYSTEM/PATH is adjusted if necessary' '
pretend/mingw64/libexec/git-core pretend/usr/bin &&
cp "$GIT_EXEC_PATH"/git.exe pretend/mingw64/bin/ &&
cp "$GIT_EXEC_PATH"/git.exe pretend/mingw64/libexec/git-core/ &&
# copy the .dll files, if any (happens when building via CMake)
case "$GIT_EXEC_PATH"/*.dll in
*/"*.dll") ;; # no `.dll` files to be copied
*)
cp "$GIT_EXEC_PATH"/*.dll pretend/mingw64/bin/ &&
cp "$GIT_EXEC_PATH"/*.dll pretend/mingw64/libexec/git-core/
;;
esac &&
echo "env | grep MSYSTEM=" | write_script "$HOME"/bin/git-test-home &&
echo "echo mingw64" | write_script pretend/mingw64/bin/git-test-bin &&
echo "echo usr" | write_script pretend/usr/bin/git-test-bin2 &&
Expand Down

0 comments on commit e051e0b

Please sign in to comment.