git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v3 12/12] mingw: allow `git.exe` to be used instead of the "Git wrapper"

From
Junio C Hamano <gitster@pobox.com>
Date
Sep 9, 2026, 19:41 UTC
Message-ID
<xmqqik4eqkkq.fsf@gitster.g>
In-Reply-To
<4a4f24a1ba0fce48dce8f77737a5153cf304aa2c.1788981436.git.gitgitgadget@gmail.com>

"Johannes Schindelin via GitGitGadget" <gitgitgadget@gmail.com> writes:

>  t/t0060-path-utils.sh               | 30 +++++++++++++
Show 39 quoted lines
> 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" &&
Previous: Johannes Schindelin via GitGitGadgetNext: Johannes Schindelin via GitGitGadget
Message 54 of 71 in “Upstream some more Git for Windows' patches”
  1. 00/12 Upstream some more Git for Windows' patchesJohannes Schindelin via GitGitGadget, Aug 5, 2026
  2. 01/12 mingw: include the Python parts in the buildJohannes Schindelin via GitGitGadget, Aug 5, 2026
  3. 02/12 mingw: stop hard-coding `CC = gcc`Johannes Schindelin via GitGitGadget, Aug 5, 2026
  4. 03/12 mingw: drop the -D_USE_32BIT_TIME_T optionJohannes Schindelin via GitGitGadget, Aug 5, 2026
  5. 05/12 mingw: avoid over-specifying `--pic-executable`Johannes Schindelin via GitGitGadget, Aug 5, 2026
  6. 04/12 mingw: only use -Wl,--large-address-aware for 32-bit buildsJohannes Schindelin via GitGitGadget, Aug 5, 2026
  7. 08/12 mingw: rely on MSYS2's metadata instead of hard-coding itJohannes Schindelin via GitGitGadget, Aug 5, 2026
  8. Junio C HamanoAug 5, 2026
  9. Johannes SchindelinAug 6, 2026
  10. 06/12 mingw: set the prefix and HOST_CPU as per MSYS2's settingsJohannes Schindelin via GitGitGadget, Aug 5, 2026
  11. 09/12 windows: skip linking `git-<command>` for built-insJohannes Schindelin via GitGitGadget, Aug 5, 2026
  12. Junio C HamanoAug 5, 2026
  13. 07/12 mingw: only enable the MSYS2-specific stuff when compiling in MSYS2Johannes Schindelin via GitGitGadget, Aug 5, 2026
  14. 10/12 mingw: always define `ETC_*` for MSYS2 environmentsJohannes Schindelin via GitGitGadget, Aug 5, 2026
  15. 11/12 mingw: ensure valid CTYPEJohannes Schindelin via GitGitGadget, Aug 5, 2026
  16. 12/12 mingw: allow `git.exe` to be used instead of the "Git wrapper"Johannes Schindelin via GitGitGadget, Aug 5, 2026
  17. Junio C HamanoAug 6, 2026
  18. Johannes SchindelinAug 12, 2026
  19. Junio C HamanoAug 12, 2026
  20. 00/12 Upstream some more Git for Windows' patchesJohannes Schindelin via GitGitGadget, Aug 12, 2026
  21. 01/12 mingw: include the Python parts in the buildJohannes Schindelin via GitGitGadget, Aug 12, 2026
  22. 02/12 mingw: stop hard-coding `CC = gcc`Johannes Schindelin via GitGitGadget, Aug 12, 2026
  23. 03/12 mingw: drop the -D_USE_32BIT_TIME_T optionJohannes Schindelin via GitGitGadget, Aug 12, 2026
  24. 04/12 mingw: only use -Wl,--large-address-aware for 32-bit buildsJohannes Schindelin via GitGitGadget, Aug 12, 2026
  25. 05/12 mingw: avoid over-specifying `--pic-executable`Johannes Schindelin via GitGitGadget, Aug 12, 2026
  26. 06/12 mingw: set the prefix and HOST_CPU as per MSYS2's settingsJohannes Schindelin via GitGitGadget, Aug 12, 2026
  27. 07/12 mingw: only enable the MSYS2-specific stuff when compiling in MSYS2Johannes Schindelin via GitGitGadget, Aug 12, 2026
  28. 08/12 mingw: rely on MSYS2's metadata instead of hard-coding itJohannes Schindelin via GitGitGadget, Aug 12, 2026
  29. Johannes SixtAug 15, 2026
  30. Junio C HamanoAug 31, 2026
  31. Johannes SchindelinSep 9, 2026
  32. Johannes SchindelinSep 9, 2026
  33. 09/12 windows: skip linking `git-<command>` for built-insJohannes Schindelin via GitGitGadget, Aug 12, 2026
  34. 10/12 mingw: always define `ETC_*` for MSYS2 environmentsJohannes Schindelin via GitGitGadget, Aug 12, 2026
  35. 11/12 mingw: ensure valid CTYPEJohannes Schindelin via GitGitGadget, Aug 12, 2026
  36. 12/12 mingw: allow `git.exe` to be used instead of the "Git wrapper"Johannes Schindelin via GitGitGadget, Aug 12, 2026
  37. Johannes SixtAug 15, 2026
  38. 00/12 Upstream some more Git for Windows' patchesJohannes Schindelin via GitGitGadget, Sep 9, 2026
  39. 01/12 mingw: include the Python parts in the buildJohannes Schindelin via GitGitGadget, Sep 9, 2026
  40. 02/12 mingw: stop hard-coding `CC = gcc`Johannes Schindelin via GitGitGadget, Sep 9, 2026
  41. 03/12 mingw: drop the -D_USE_32BIT_TIME_T optionJohannes Schindelin via GitGitGadget, Sep 9, 2026
  42. 04/12 mingw: only use -Wl,--large-address-aware for 32-bit buildsJohannes Schindelin via GitGitGadget, Sep 9, 2026
  43. 05/12 mingw: avoid over-specifying `--pic-executable`Johannes Schindelin via GitGitGadget, Sep 9, 2026
  44. 06/12 mingw: set the prefix and HOST_CPU as per MSYS2's settingsJohannes Schindelin via GitGitGadget, Sep 9, 2026
  45. 07/12 mingw: only enable the MSYS2-specific stuff when compiling in MSYS2Johannes Schindelin via GitGitGadget, Sep 9, 2026
  46. 08/12 mingw: rely on MSYS2's metadata instead of hard-coding itJohannes Schindelin via GitGitGadget, Sep 9, 2026
  47. Johannes SixtSep 9, 2026
  48. Johannes SchindelinSep 9, 2026
  49. Junio C HamanoSep 9, 2026
  50. 09/12 windows: skip linking `git-<command>` for built-insJohannes Schindelin via GitGitGadget, Sep 9, 2026
  51. 10/12 mingw: always define `ETC_*` for MSYS2 environmentsJohannes Schindelin via GitGitGadget, Sep 9, 2026
  52. 11/12 mingw: ensure valid CTYPEJohannes Schindelin via GitGitGadget, Sep 9, 2026
  53. 12/12 mingw: allow `git.exe` to be used instead of the "Git wrapper"Johannes Schindelin via GitGitGadget, Sep 9, 2026
  54. Junio C HamanoSep 9, 2026
  55. 00/13 Upstream some more Git for Windows' patchesJohannes Schindelin via GitGitGadget, Sep 10, 2026
  56. 01/13 mingw: include the Python parts in the buildJohannes Schindelin via GitGitGadget, Sep 10, 2026
  57. 02/13 mingw: stop hard-coding `CC = gcc`Johannes Schindelin via GitGitGadget, Sep 10, 2026
  58. 03/13 mingw: drop the -D_USE_32BIT_TIME_T optionJohannes Schindelin via GitGitGadget, Sep 10, 2026
  59. 04/13 mingw: only use -Wl,--large-address-aware for 32-bit buildsJohannes Schindelin via GitGitGadget, Sep 10, 2026
  60. Oswald BuddenhagenSep 11, 2026
  61. 05/13 mingw: avoid over-specifying `--pic-executable`Johannes Schindelin via GitGitGadget, Sep 10, 2026
  62. 06/13 mingw: set the prefix and HOST_CPU as per MSYS2's settingsJohannes Schindelin via GitGitGadget, Sep 10, 2026
  63. Oswald BuddenhagenSep 11, 2026
  64. 07/13 mingw: only enable the MSYS2-specific stuff when compiling in MSYS2Johannes Schindelin via GitGitGadget, Sep 10, 2026
  65. 08/13 mingw: rely on MSYS2's metadata instead of hard-coding itJohannes Schindelin via GitGitGadget, Sep 10, 2026
  66. 09/13 windows: skip linking `git-<command>` for built-insJohannes Schindelin via GitGitGadget, Sep 10, 2026
  67. 10/13 mingw: always define `ETC_*` for MSYS2 environmentsJohannes Schindelin via GitGitGadget, Sep 10, 2026
  68. 11/13 mingw: ensure valid CTYPEJohannes Schindelin via GitGitGadget, Sep 10, 2026
  69. 12/13 mingw: allow `git.exe` to be used instead of the "Git wrapper"Johannes Schindelin via GitGitGadget, Sep 10, 2026
  70. 13/13 t0060: adjust the code styleJohannes Schindelin via GitGitGadget, Sep 10, 2026
  71. Junio C HamanoSep 10, 2026

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.