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

Re: [PATCH 05/11] worktree: use 'worktree' over 'working tree'

From
Derrick Stolee <derrickstolee@github.com>
Date
Feb 24, 2022, 15:53 UTC
Message-ID
<545f0248-89ad-3194-02ae-2f1a47f949db@github.com>
In-Reply-To
<d9394947-f545-2dd9-b788-38fd7202243d@iee.email>
On 2/24/2022 9:33 AM, Philip Oakley wrote:
Show 21 quoted lines
> On 20/02/2022 17:54, Derrick Stolee via GitGitGadget wrote:
>> From: Derrick Stolee <derrickstolee@github.com>
>>
>> It is helpful to distinguish between a 'working tree' and a 'worktree'.
>> A worktree contains a working tree plus additional metadata. This
>> metadata includes per-worktree refs and worktree-specific config.
> Doesn't this need a clear call-out in the text to highlight the
> distinction, so that it is obvious at first glance to the casual reader?
> 
> I'd ended up with something like:
> - worktree
>     A directory whose files and sub-directories are (selectively) under
> Git revision management.
> - working tree
>     The working tree comprises Git revision management meta-data for the
> worktree,
>      and the worktree itself.
>     The meta-data may be independently located away from the worktree's
> data.
> 
> The key feature is to have a layout structure that shows the distinction.

See below where I mention that the first paragraph points out this distinction. Your use of bullets makes it even more clear, and I think that would be more valuable if this wasn't the very first thing in the document.

> Or are we trying to remove all references to "working tree"? Or have I
> misunderstood?
...
>>  A git repository can support multiple working trees, allowing you to check
> Are we removing the above "working trees" phrases as well?

This one is important to keep. The worktree feature is how Git manages multiple working trees.

The reason for switching most of the other references is because the discussion applies specifically to worktrees, not working trees.

Show 10 quoted lines
>>  out more than one branch at a time.  With `git worktree add` a new working
>> -tree is associated with the repository.  This new working tree is called a
>> -"linked working tree" as opposed to the "main working tree" prepared by
>> -linkgit:git-init[1] or linkgit:git-clone[1].
>> -A repository has one main working tree (if it's not a
>> -bare repository) and zero or more linked working trees. When you are done
>> -with a linked working tree, remove it with `git worktree remove`.
>> +tree is associated with the repository, along with additional metadata
>> +that differentiates that working tree from others in the same repository.
>> +The working tree, along with this metada, is called a "worktree".

This first paragraph is all about the distinction between working tree and worktree, so it hopefully handles the concerns you had above.

Thanks, -Stolee

Previous: Philip OakleyNext: Philip Oakley
Message 14 of 63 in “Updates to worktree code and docs”
  1. 00/11 Updates to worktree code and docsDerrick Stolee via GitGitGadget, Feb 20, 2022
  2. 01/11 worktree: combine two translatable messagesDerrick Stolee via GitGitGadget, Feb 20, 2022
  3. Junio C HamanoFeb 20, 2022
  4. Derrick StoleeFeb 20, 2022
  5. 03/11 worktree: extract copy_sparse_checkout()Derrick Stolee via GitGitGadget, Feb 20, 2022
  6. 02/11 worktree: extract copy_filtered_worktree_config()Derrick Stolee via GitGitGadget, Feb 20, 2022
  7. Junio C HamanoFeb 20, 2022
  8. 04/11 worktree: extract checkout_worktree()Derrick Stolee via GitGitGadget, Feb 20, 2022
  9. Taylor BlauFeb 20, 2022
  10. 05/11 worktree: use 'worktree' over 'working tree'Derrick Stolee via GitGitGadget, Feb 20, 2022
  11. Junio C HamanoFeb 20, 2022
  12. Derrick StoleeFeb 20, 2022
  13. Philip OakleyFeb 24, 2022
  14. Derrick StoleeFeb 24, 2022
  15. Philip OakleyMar 3, 2022
  16. 07/11 worktree: use 'worktree' over 'working tree'Derrick Stolee via GitGitGadget, Feb 20, 2022
  17. 06/11 worktree: use 'worktree' over 'working tree'Derrick Stolee via GitGitGadget, Feb 20, 2022
  18. 08/11 worktree: use 'worktree' over 'working tree'Derrick Stolee via GitGitGadget, Feb 20, 2022
  19. Taylor BlauFeb 20, 2022
  20. 09/11 worktree: use 'worktree' over 'working tree'Derrick Stolee via GitGitGadget, Feb 20, 2022
  21. Taylor BlauFeb 20, 2022
  22. Derrick StoleeFeb 21, 2022
  23. 10/11 worktree: use 'worktree' over 'working tree'Derrick Stolee via GitGitGadget, Feb 20, 2022
  24. 11/11 worktree: use 'worktree' over 'working tree'Derrick Stolee via GitGitGadget, Feb 20, 2022
  25. Taylor BlauFeb 20, 2022
  26. Derrick StoleeFeb 21, 2022
  27. Taylor BlauFeb 20, 2022
  28. Taylor BlauFeb 20, 2022
  29. 00/11 Updates to worktree code and docsDerrick Stolee via GitGitGadget, Feb 22, 2022
  30. 01/11 worktree: combine two translatable messagesDerrick Stolee via GitGitGadget, Feb 22, 2022
  31. 02/11 worktree: extract copy_filtered_worktree_config()Derrick Stolee via GitGitGadget, Feb 22, 2022
  32. 04/11 worktree: extract checkout_worktree()Derrick Stolee via GitGitGadget, Feb 22, 2022
  33. 05/11 worktree: use 'worktree' over 'working tree'Derrick Stolee via GitGitGadget, Feb 22, 2022
  34. Junio C HamanoFeb 22, 2022
  35. Elijah NewrenFeb 23, 2022
  36. 03/11 worktree: extract copy_sparse_checkout()Derrick Stolee via GitGitGadget, Feb 22, 2022
  37. 06/11 worktree: use 'worktree' over 'working tree'Derrick Stolee via GitGitGadget, Feb 22, 2022
  38. Junio C HamanoFeb 22, 2022
  39. Derrick StoleeFeb 22, 2022
  40. 07/11 worktree: use 'worktree' over 'working tree'Derrick Stolee via GitGitGadget, Feb 22, 2022
  41. 08/11 worktree: use 'worktree' over 'working tree'Derrick Stolee via GitGitGadget, Feb 22, 2022
  42. Taylor BlauFeb 22, 2022
  43. Derrick StoleeFeb 22, 2022
  44. Taylor BlauFeb 23, 2022
  45. 09/11 worktree: use 'worktree' over 'working tree'Derrick Stolee via GitGitGadget, Feb 22, 2022
  46. 11/11 worktree: use 'worktree' over 'working tree'Derrick Stolee via GitGitGadget, Feb 22, 2022
  47. 10/11 worktree: use 'worktree' over 'working tree'Derrick Stolee via GitGitGadget, Feb 22, 2022
  48. Taylor BlauFeb 22, 2022
  49. Junio C HamanoFeb 23, 2022
  50. Elijah NewrenFeb 23, 2022
  51. Derrick StoleeFeb 23, 2022
  52. 00/11 Updates to worktree code and docsDerrick Stolee via GitGitGadget, Feb 23, 2022
  53. 01/11 worktree: combine two translatable messagesDerrick Stolee via GitGitGadget, Feb 23, 2022
  54. 02/11 worktree: extract copy_filtered_worktree_config()Derrick Stolee via GitGitGadget, Feb 23, 2022
  55. 05/11 worktree: use 'worktree' over 'working tree'Derrick Stolee via GitGitGadget, Feb 23, 2022
  56. 04/11 worktree: extract checkout_worktree()Derrick Stolee via GitGitGadget, Feb 23, 2022
  57. 03/11 worktree: extract copy_sparse_checkout()Derrick Stolee via GitGitGadget, Feb 23, 2022
  58. 06/11 worktree: use 'worktree' over 'working tree'Derrick Stolee via GitGitGadget, Feb 23, 2022
  59. 08/11 worktree: use 'worktree' over 'working tree'Derrick Stolee via GitGitGadget, Feb 23, 2022
  60. 07/11 worktree: use 'worktree' over 'working tree'Derrick Stolee via GitGitGadget, Feb 23, 2022
  61. 09/11 worktree: use 'worktree' over 'working tree'Derrick Stolee via GitGitGadget, Feb 23, 2022
  62. 10/11 worktree: use 'worktree' over 'working tree'Derrick Stolee via GitGitGadget, Feb 23, 2022
  63. 11/11 worktree: use 'worktree' over 'working tree'Derrick Stolee via GitGitGadget, Feb 23, 2022

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.