From: Junio C Hamano Date: Wed, 09 Sep 2026 19:41:09 GMT Subject: Re: [PATCH v3 12/12] mingw: allow `git.exe` to be used instead of the "Git wrapper" Message-ID: In-Reply-To: <4a4f24a1ba0fce48dce8f77737a5153cf304aa2c.1788981436.git.gitgitgadget@gmail.com> "Johannes Schindelin via GitGitGadget" writes: > t/t0060-path-utils.sh | 30 +++++++++++++ > diff --git a/t/t0060-path-utils.sh b/t/t0060-path-utils.sh > index 8545cdfab5..02906055d3 100755 > --- a/t/t0060-path-utils.sh > +++ b/t/t0060-path-utils.sh > @@ -611,4 +611,34 @@ test_expect_success !VALGRIND,RUNTIME_PREFIX,CAN_EXEC_IN_PWD '%(prefix)/ works' > test_cmp expect actual > ' > > +test_expect_success MINGW,RUNTIME_PREFIX 'MSYSTEM/PATH is adjusted if necessary' ' > + if test -z "$MINGW_PREFIX" > + then > + MINGW_PREFIX="/$(echo "${MSYSTEM:-MINGW64}" | tr A-Z a-z)" > + fi && > + mkdir -p "$HOME"/bin pretend"$MINGW_PREFIX"/bin \ > + pretend"$MINGW_PREFIX"/libexec/git-core pretend/usr/bin && > + 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) > + 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/ > + 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 && > + > + ( > + MSYSTEM= && > + GIT_EXEC_PATH= && > + pretend"$MINGW_PREFIX"/libexec/git-core/git.exe test-home >actual && > + pretend"$MINGW_PREFIX"/libexec/git-core/git.exe test-bin >>actual && > + pretend"$MINGW_PREFIX"/bin/git.exe test-bin2 >>actual > + ) && > + test_write_lines MSYSTEM=$MSYSTEM "${MINGW_PREFIX#/}" usr >expect && > + test_cmp expect actual > +' > + > test_done The previous iteration had a "while at it" style fix to another test a few lines back, which is the only difference the end state of this iteration has relative to the older round. The movement of part of [8/12] to this step is logically correct (even though it does not show in the end state, of course). Shall we mark the topic ready for 'next' by now? Thanks. diff --git c/t/t0060-path-utils.sh w/t/t0060-path-utils.sh index 56faf5fe73..02906055d3 100755 --- c/t/t0060-path-utils.sh +++ w/t/t0060-path-utils.sh @@ -602,8 +602,7 @@ test_expect_success !VALGRIND,RUNTIME_PREFIX,CAN_EXEC_IN_PWD 'RUNTIME_PREFIX wor echo "echo HERE" | write_script pretend/libexec/git-core/git-here && GIT_EXEC_PATH= ./pretend/bin/git here >actual && echo HERE >expect && - test_cmp expect actual -' + test_cmp expect actual' test_expect_success !VALGRIND,RUNTIME_PREFIX,CAN_EXEC_IN_PWD '%(prefix)/ works' ' git config yes.path "%(prefix)/yes" &&