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

git work trees

From
TDtaylor, david <david.taylor@dell.com>
Date
Apr 11, 2017, 15:14 UTC
Message-ID
<63F1AEE13FAE864586D589C671A6E18B0CFBF7@MX203CL03.corp.emc.com>
We are using Git in a distributed environment.

In the United States, we have the master repository in one state and a build cluster in a different state. In addition to people in the US doing builds, we have people in other countries (Ireland, India, Israel, Russia, possibly others) doing builds -- using the build cluster.

The local mirror of the repository is NFS accessible. The plan is to make builds faster through the use of work trees. The build cluster nodes involved in the build will have a worktree in RAM -- checked out for the duration of the build. Since the worktree is in RAM, it will not be NFS accessible.

[Cloning takes 20+ minutes when the network is unloaded. Building, with sources NFS mounted, takes 5-10 minutes.]

This presents a few problems.

When we are done with a work tree, we want to clean up -- think: prune. But, you cannot prune just one worktree; you have to prune the set. And no machine has access to all the worktrees. So, no machine knows which ones are prunable.

There is no 'lock' option to 'add'. If someone does a 'prune' after you do an 'add' and before you do a 'lock', then your 'add' is undone.

Are there any plans to add a '[--lock]' option to 'add' to create the worktree in the locked state? And/or plans to add a [<path>...] option to prune to say 'prune only this path / these paths'?

If there are no plans, is the above an acceptable interface? And if we implemented it, would it be looked upon favorably?

Thanks.
Next: Duy Nguyen
Message 1 of 10 in “git work trees”
  1. taylor, davidApr 11, 2017
  2. Duy NguyenApr 12, 2017
  3. worktree add: add --lock optionNguyễn Thái Ngọc Duy, Apr 12, 2017
  4. Junio C HamanoApr 13, 2017
  5. Duy NguyenApr 14, 2017
  6. taylor, davidApr 24, 2017
  7. Jacob KellerApr 14, 2017
  8. Junio C HamanoApr 15, 2017
  9. Junio C HamanoApr 15, 2017
  10. Duy NguyenApr 15, 2017

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.