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

[PATCH 0/2] Fix git subtree on Windows

From
Johannes Schindelin via GitGitGadget <gitgitgadget@gmail.com>
Date
Jun 10, 2021, 09:13 UTC
Message-ID
<pull.978.git.1623316412.gitgitgadget@gmail.com>

In the topic branch ls/subtree, we saw a lot of improvements of the git subtree command, and some cleaning up, too. For example, 22d550749361 (subtree: don't fuss with PATH, 2021-04-27) carefully laid out a history of changes intended to work around issues where the git-subtree script was not in the intended location, and removed a statement modifying PATH in favor of a conditional warning (contingent on the PATH being in an unexpected shape).

This particular condition, however, was never tested on Windows, and it broke git subtree in Git for Windows v2.32.0, as reported here [https://github.com/git-for-windows/git/issues/3260]. Now, every invocation of git subtree, with or without command-line arguments, results in output like this:

It looks like either your git installation or your git-subtree installation is broken.

Tips:
 - If `git --exec-path` does not print the correct path to
   your git install directory, then set the GIT_EXEC_PATH
   environment variable to the correct directory.
 - Make sure that your `git-core\git-subtree` file is either in your
   PATH or in your git exec path (`C:/Users/harry/Downloads/PortableGit/mingw64/libexec/git-core`).
 - You should run git-subtree as `git core\git-subtree`,
   not as `git-core\git-subtree`.

This patch series provides a band-aid to that symptom, and is based on ls/subtree.

Johannes Schindelin (2):
  subtree: fix the GIT_EXEC_PATH sanity check to work on Windows
  subtree: fix assumption about the directory separator
 contrib/subtree/git-subtree.sh | 16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)
base-commit: 9a3e3ca2ba869f9fef9f8be390ed45457565ccd1
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-978%2Fdscho%2Ffix-subtree-on-windows-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-978/dscho/fix-subtree-on-windows-v1
Pull-Request: https://github.com/gitgitgadget/git/pull/978
-- 
gitgitgadget
Next: Johannes Schindelin via GitGitGadget
Message 1 of 27 in “Fix git subtree on Windows”
  1. 0/2 Fix git subtree on WindowsJohannes Schindelin via GitGitGadget, Jun 10, 2021
  2. 1/2 subtree: fix the GIT_EXEC_PATH sanity check to work on WindowsJohannes Schindelin via GitGitGadget, Jun 10, 2021
  3. Luke ShumakerJun 11, 2021
  4. Junio C HamanoJun 11, 2021
  5. Luke ShumakerJun 11, 2021
  6. Johannes SchindelinJun 11, 2021
  7. Luke ShumakerJun 11, 2021
  8. Johannes SchindelinJun 14, 2021
  9. Junio C HamanoJun 15, 2021
  10. Jeff KingJun 15, 2021
  11. Bagas SanjayaJun 15, 2021
  12. Jeff KingJun 15, 2021
  13. Johannes SchindelinJun 15, 2021
  14. Junio C HamanoJun 16, 2021
  15. Jeff KingJun 16, 2021
  16. 2/2 subtree: fix assumption about the directory separatorJohannes Schindelin via GitGitGadget, Jun 10, 2021
  17. Luke ShumakerJun 11, 2021
  18. Johannes SchindelinJun 11, 2021
  19. Luke ShumakerJun 11, 2021
  20. Johannes SchindelinJun 11, 2021
  21. Luke ShumakerJun 11, 2021
  22. Felipe ContrerasJun 11, 2021
  23. Luke ShumakerJun 12, 2021
  24. 0/2 Fix git subtree on WindowsJohannes Schindelin via GitGitGadget, Jun 14, 2021
  25. 2/2 subtree: fix assumption about the directory separatorJohannes Schindelin via GitGitGadget, Jun 14, 2021
  26. 1/2 subtree: fix the GIT_EXEC_PATH sanity check to work on WindowsJohannes Schindelin via GitGitGadget, Jun 14, 2021
  27. Junio C HamanoJun 15, 2021

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.