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

Re: [PATCH v3 10/11] contrib: remove "git-new-workdir"

From
Gabriel Scherer <gabriel.scherer@gmail.com>
Date
Sep 8, 2025, 09:28 UTC
Message-ID
<5580aa89-09f1-426e-8483-c99481c998ab@gmail.com>
In-Reply-To
<20250512-pks-contrib-spring-cleanup-v3-10-32e151b0bfb0@pks.im>
Dear git developers,

I find myself affected by the removal of the `git-new-workdir` script which is a relatively common part of my workflow. I am writing to ask if it might be possible to reinstate the script in `contrib`, and also possibly create a discussion with other users affected.

(The removal of the script was released in git 2.51, three weeks ago.)
Thanks for your work on git!
## Details/comments
 > The command thus predates git-worktree(1), which is what people use
 > nowadays to create any such working directory. As such, the script
 > doesn't really have much of a reason to exist nowadays anymore.

`git worktree` suffers from the substantial restriction that it is not allowed for two worktrees to checkout the same branch. I understand why its designers felt that this would provide better guarantees (it is not a good idea to mutate branch names that are checked out somewhere else), but checking out various branches to test them and inspect their code (before returning to the feature branch I am actively working on) is a common part of my workflow. Getting a 'fatal error' because some other, independent worktree also checked this branch out is a hindrance.

Note: I don't know about the `worktree` implementation and whether the
no-double-checkout restriction is fundamental to its correctness or
just a user-interface feature to avoid sharp edges. I would be happy
to migrate to `worktree` if it was possible to disable it (presumably
via a repository-global parameter, or maybe something
finer-grained). It sounds like more work than just keeping
`git-new-workdir` alive -- but I am sure there are niceties with
`worktree` that migrating users would benefit from.
 > It also doesn't seem like the script is still in use: the last time
 > it has received an update was in e32afab7b03 (git-new-workdir: don't
 > fail if the target directory is empty, 2014-11-26), more than a
 > decade ago.

I use `git-new-workdir` actively, and have never suffered from an issue worth fixing or reporting upstream. The fact that it was last changed a decade ago also suggests that the maintenance cost for git upstream is minimal.

Previous: Patrick SteinhardtNext: Kristoffer Haugsbakk
Message 15 of 25 in “Spring cleanup of "contrib/"”
  1. 00/11 Spring cleanup of "contrib/"Patrick Steinhardt, May 12, 2025
  2. 01/11 contrib: remove "remotes2config.sh"Patrick Steinhardt, May 12, 2025
  3. 02/11 contrib: remove "examples" directoryPatrick Steinhardt, May 12, 2025
  4. 03/11 contrib: remove remote-helper stubsPatrick Steinhardt, May 12, 2025
  5. 04/11 contrib: remove "thunderbird-patch-inline"Patrick Steinhardt, May 12, 2025
  6. Junio C HamanoMay 16, 2025
  7. Toon ClaesMay 26, 2025
  8. Junio C HamanoJun 4, 2025
  9. 05/11 contrib: remove "hooks" directoryPatrick Steinhardt, May 12, 2025
  10. 07/11 contrib: remove "persistent-https" remote helperPatrick Steinhardt, May 12, 2025
  11. 06/11 contrib: remove "mw-to-git"Patrick Steinhardt, May 12, 2025
  12. 08/11 contrib: remove "git-resurrect.sh"Patrick Steinhardt, May 12, 2025
  13. 09/11 contrib: remove "emacs" directoryPatrick Steinhardt, May 12, 2025
  14. 10/11 contrib: remove "git-new-workdir"Patrick Steinhardt, May 12, 2025
  15. Gabriel SchererSep 8, 2025
  16. Kristoffer HaugsbakkSep 8, 2025
  17. Gabriel SchererSep 8, 2025
  18. D. Ben KnobleSep 12, 2025
  19. Gabriel SchererSep 12, 2025
  20. Junio C HamanoSep 12, 2025
  21. Phillip WoodSep 12, 2025
  22. Junio C HamanoSep 12, 2025
  23. Junio C HamanoSep 8, 2025
  24. 11/11 contrib: remove some scripts in "stats" directoryPatrick Steinhardt, May 12, 2025
  25. Elijah NewrenMay 13, 2025

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.