From 4cf0647f7e72ee2af828eb7c656a7bb40ad22589 Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Tue, 15 Apr 2025 18:24:48 +0200 Subject: [PATCH] fixup! mingw: allow `git.exe` to be used instead of the "Git wrapper" Let's make the `.dll` copying a bit more robust. At least in my hands, the check sometimes failed to detect whether there are any `.dll` files to be copied. Signed-off-by: Johannes Schindelin --- t/t0060-path-utils.sh | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/t/t0060-path-utils.sh b/t/t0060-path-utils.sh index 1e94882f15..5abfa202c1 100755 --- a/t/t0060-path-utils.sh +++ b/t/t0060-path-utils.sh @@ -630,13 +630,11 @@ test_expect_success MINGW,RUNTIME_PREFIX 'MSYSTEM/PATH is adjusted if necessary' cp "$GIT_EXEC_PATH"/git.exe pretend"$MINGW_PREFIX"/bin/ && cp "$GIT_EXEC_PATH"/git.exe pretend"$MINGW_PREFIX"/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 - *) + if test -n "$(ls "$GIT_EXEC_PATH"/*.dll 2>/dev/null)" + then cp "$GIT_EXEC_PATH"/*.dll pretend"$MINGW_PREFIX"/bin/ && cp "$GIT_EXEC_PATH"/*.dll pretend"$MINGW_PREFIX"/libexec/git-core/ - ;; - esac && + fi && echo "env | grep MSYSTEM=" | write_script "$HOME"/bin/git-test-home && echo "echo ${MINGW_PREFIX#/}" | write_script pretend"$MINGW_PREFIX"/bin/git-test-bin && echo "echo usr" | write_script pretend/usr/bin/git-test-bin2 &&