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 12, 2025, 18:55 UTC
Message-ID
<b4628cc8-3aad-4911-bcd1-6880d7707250@gmail.com>
In-Reply-To
<CALnO6CBDcDEXe3a_mpdwTi7ujL-fU5QrDeK704X+5bbkpNgb5w@mail.gmail.com>
On 12/09/2025 20:14, D. Ben Knoble wrote:
Show 6 quoted lines
>  From a quick glance, the old script symlinks various repository state
> together. You could probably get something equally useful out of
>
>      git clone --shared . ../new-worktree
>
> (Provide branch options, etc., as desired?)

Quick testing seems to indicate that --shared shares less than I would expect / am used to. For example, the remotes are not shared (unlike with `git worktree` and `new-workdir`).

I currently have 73 remotes configured for the repository I am creating workdirs for, and I am happy to keep them configured in a single place.

(The fact that the branch state is synchronized between all workdirs/worktrees is also a feature for my use-case, I don't have to constantly re-synchronize the work{dirs,trees} for my usage.)

> Alternatively, you could maintain the script yourself by e.g. copying
> it to somewhere on your $PATH or extracting the contrib/workdir
> history into a repo of your choice.

I have a naive question. 'workdir' is a script that has been around for a long while, and apparently causes no maintenance burden whatsoever. It was removed based on the impression that nobody was using it (let me quote the patch description at the end of the present email) -- I certainly understand that it is hard to gather information about this. My question: now that it is clear that some people are using it, what is the reason not to include it again in the contrib/ repository of git upstream? If Patrick is not interested in reverting this change, would I be welcome in sending a patch to do so?

I feel like I am making git developers relive the "workflow" xkcd comic (  https://xkcd.com/1172/ ). But I have the impression that 'git worktree' really has an interface limitation in the way 'checkout' is restricted; I would be happy to migrate to it if there was a way to disable this limitation. My use-case is to have several working directories for a single shared instance of a git directory, in such a way that I can work in each working directory independently of the others. In contrast 'worktree' puts limits/constraints, for a given workdir, depending on the state of the *other* workdirs, which would force me to have a global map in mind of the state of each workdir.

From: Patrick Steinhardt <ps@pks.im>
Show 10 quoted lines
> The "git-new-workdir" command has been introduced to make it possible to
> have a separate working directory in a different place. 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.
>
> 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.
> Remove it as well as the tests that depend on it.
Previous: D. Ben KnobleNext: Junio C Hamano
Message 19 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.