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

[PATCH v4 09/13] windows: skip linking `git-<command>` for built-ins

From
Johannes Schindelin via GitGitGadget <gitgitgadget@gmail.com>
Date
Sep 10, 2026, 06:05 UTC
Message-ID
<0d2990aa147482a743da8fdbe4f9ded2e7fd083d.1789020327.git.gitgitgadget@gmail.com>
In-Reply-To
<pull.2195.v4.git.1789020327.gitgitgadget@gmail.com>
From: Johannes Schindelin <johannes.schindelin@gmx.de>

It is merely a historical wart that, say, `git-commit` exists in the `libexec/git-core/` directory, a tribute to the original idea to let Git be essentially a bunch of Unix shell scripts revolving around very few "plumbing" (AKA low-level) commands.

Git has evolved a lot from there. These days, most of Git's functionality is contained within the `git` executable, in the form of "built-in" commands.

To accommodate for scripts that use the "dashed" form of Git commands, even today, Git provides hard-links that make the `git` executable available as, say, `git-commit`, just in case that an old script has not been updated to invoke `git commit`.

Those hard-links do not come cheap: they take about half a minute for every build of Git on Windows, they are mistaken for taking up huge amounts of space by some Windows Explorer versions that do not understand hard-links, and therefore many a "bug" report had to be addressed.

The "dashed form" has been officially deprecated in Git version 1.5.4, which was released on February 2nd, 2008, i.e. a very long time ago. This deprecation was never finalized by skipping these hard-links, but we can start the process now, in Git for Windows.

Helped-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
---
 config.mak.uname | 2 ++
 1 file changed, 2 insertions(+)
diff --git a/config.mak.uname b/config.mak.uname
index 3a90995587..88bbe1d78f 100644
--- a/config.mak.uname
+++ b/config.mak.uname
@@ -518,6 +518,7 @@ ifeq ($(uname_S),Windows)
 	NO_POSIX_GOODIES = UnfortunatelyYes
 	NATIVE_CRLF = YesPlease
 	DEFAULT_HELP_FORMAT = html
+	SKIP_DASHED_BUILT_INS = YabbaDabbaDoo
 ifeq (/mingw64,$(subst 32,64,$(subst clangarm,mingw,$(prefix))))
 	# Move system config into top-level /etc/
 	ETC_GITCONFIG = ../etc/gitconfig
@@ -710,6 +711,7 @@ ifeq ($(uname_S),MINGW)
 	FSMONITOR_DAEMON_BACKEND = win32
 	FSMONITOR_OS_SETTINGS = win32
 
+	SKIP_DASHED_BUILT_INS = YabbaDabbaDoo
 	RUNTIME_PREFIX = YesPlease
 	HAVE_WPGMPTR = YesWeDo
 	NO_ST_BLOCKS_IN_STRUCT_STAT = YesPlease
-- 
gitgitgadget
Previous: Johannes Schindelin via GitGitGadgetNext: Johannes Schindelin via GitGitGadget
Message 66 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.