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

[PATCH v3 00/11] Updates to worktree code and docs

From
Derrick Stolee via GitGitGadget <gitgitgadget@gmail.com>
Date
Feb 23, 2022, 14:29 UTC
Message-ID
<pull.1154.v3.git.1645626559.gitgitgadget@gmail.com>
In-Reply-To
<pull.1154.v2.git.1645489080.gitgitgadget@gmail.com>

This is built on top of ds/sparse-checkout-requires-per-worktree-config and includes some forward fixes for comments from that series.

 * Patch 1 combines two translatable messages into one. (Thanks, Jean-Noël)
 * Patches 2-4 extract methods from the already-busy add_worktree() method.
   (Thanks, Eric)
 * Patches 5-11 update git-worktree.txt to use 'worktree' over 'working
   tree'. This involves some rewrapping of the paragraphs, so the diffs are
   not obviously just a find and replace. I split the changes mostly by
   section of the file to keep the diffs from being too large.

Updates in v3 =============

Several typos were fixed:
 * Patch 5: fixed "metata" and "a a" typos.
 * Patch 6: fixed "working directory" typo.
 * Patch 8: fixed typo in Taylor's email.

Updates in v2 =============

Based on Junio and Taylor's review, I updated some language in the docs:
 * Some uses of "worktree" should have stayed as "working tree"
 * Some adjacent wording was improved.
Thanks, -Stolee
Derrick Stolee (11):
  worktree: combine two translatable messages
  worktree: extract copy_filtered_worktree_config()
  worktree: extract copy_sparse_checkout()
  worktree: extract checkout_worktree()
  worktree: use 'worktree' over 'working tree'
  worktree: use 'worktree' over 'working tree'
  worktree: use 'worktree' over 'working tree'
  worktree: use 'worktree' over 'working tree'
  worktree: use 'worktree' over 'working tree'
  worktree: use 'worktree' over 'working tree'
  worktree: use 'worktree' over 'working tree'
 Documentation/git-worktree.txt | 268 ++++++++++++++++-----------------
 builtin/worktree.c             | 138 +++++++++--------
 2 files changed, 209 insertions(+), 197 deletions(-)
base-commit: 3ce113827287079dced9aaf9c5d1e1734ecaa265
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-1154%2Fderrickstolee%2Fworktree-forward-fixes-v3
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-1154/derrickstolee/worktree-forward-fixes-v3
Pull-Request: https://github.com/gitgitgadget/git/pull/1154
Range-diff vs v2:
  1:  a113ed9a844 =  1:  a113ed9a844 worktree: combine two translatable messages
  2:  f8aa87112a8 =  2:  f8aa87112a8 worktree: extract copy_filtered_worktree_config()
  3:  ccc5b1ef9fb =  3:  ccc5b1ef9fb worktree: extract copy_sparse_checkout()
  4:  1e62e4e4fa1 =  4:  1e62e4e4fa1 worktree: extract checkout_worktree()
  5:  2801ae232ae !  5:  4e66cf33648 worktree: use 'worktree' over 'working tree'
     @@ Documentation/git-worktree.txt: Manage multiple working trees attached to the sa
      -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".
     ++The working tree, along with this metadata, is called a "worktree".
      +
      +This new worktree is called a "linked worktree" as opposed to the "main
      +worktree" prepared by linkgit:git-init[1] or linkgit:git-clone[1].
     @@ Documentation/git-worktree.txt: Manage multiple working trees attached to the sa
      -which is not always mounted, you can prevent its administrative files from
      -being pruned by issuing the `git worktree lock` command, optionally
      -specifying `--reason` to explain why the working tree is locked.
     -+If the working tree for a a linked worktree is stored on a portable device
     ++If the working tree for a linked worktree is stored on a portable device
      +or network share which is not always mounted, you can prevent its
      +administrative files from being pruned by issuing the `git worktree lock`
      +command, optionally specifying `--reason` to explain why the worktree is
  6:  a375e4b6ff0 !  6:  704cce17815 worktree: use 'worktree' over 'working tree'
     @@ Documentation/git-worktree.txt: branches from there if `<branch>` is ambiguous b
      -reestablish the connection. If multiple linked working trees are moved,
      -running `repair` from any working tree with each tree's new `<path>` as
      -an argument, will reestablish the connection to all the specified paths.
     -+Similarly, if the working directory for a linked worktree is moved without
     ++Similarly, if the working tree for a linked worktree is moved without
      +using `git worktree move`, the main worktree (or bare repository) will be
      +unable to locate it. Running `repair` within the recently-moved worktree
      +will reestablish the connection. If multiple linked worktrees are moved,
  7:  d1c4b687cbc =  7:  bee53e679ff worktree: use 'worktree' over 'working tree'
  8:  65a0cd52711 !  8:  0eb374620a7 worktree: use 'worktree' over 'working tree'
     @@ Commit message
          The first paragraph of this section was also a bit confusing, so it is
          cleaned up to make it easier to understand.
      
     -    Helped-by: Taylor Blau <m3@ttaylorr.com>
     +    Helped-by: Taylor Blau <me@ttaylorr.com>
          Signed-off-by: Derrick Stolee <derrickstolee@github.com>
      
       ## Documentation/git-worktree.txt ##
  9:  e8890134fb4 =  9:  c9afb58d967 worktree: use 'worktree' over 'working tree'
 10:  75f0e4ff5c2 = 10:  1e235677ef0 worktree: use 'worktree' over 'working tree'
 11:  1e07383552a = 11:  11ee7e107b4 worktree: use 'worktree' over 'working tree'
-- 
gitgitgadget
Previous: Derrick StoleeNext: Derrick Stolee via GitGitGadget
Message 52 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.