worktree: use 'worktree' over 'working tree'

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. This is the sixth of multiple changes to git-worktree.txt, restricted to the DETAILS section. Signed-off-by: Derrick Stolee <derrickstolee@github.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Derrick Stolee committed Feb 23, 2022 at 14:29 UTC f13a146c81e361eab43cd095c80c01562b6016de
1 file changed +12 -12
Documentation/git-worktree.txt
+12 -12
@@ -319,29 +319,29 @@ linkgit:git-config[1] for more details.
319
320 DETAILS
321 -------
322 -Each linked working tree has a private sub-directory in the repository's
322 +Each linked worktree has a private sub-directory in the repository's
323 `$GIT_DIR/worktrees` directory. The private sub-directory's name is usually
324 -the base name of the linked working tree's path, possibly appended with a
324 +the base name of the linked worktree's path, possibly appended with a
325 number to make it unique. For example, when `$GIT_DIR=/path/main/.git` the
326 command `git worktree add /path/other/test-next next` creates the linked
327 -working tree in `/path/other/test-next` and also creates a
327 +worktree in `/path/other/test-next` and also creates a
328 `$GIT_DIR/worktrees/test-next` directory (or `$GIT_DIR/worktrees/test-next1`
329 if `test-next` is already taken).
330
331 -Within a linked working tree, `$GIT_DIR` is set to point to this private
331 +Within a linked worktree, `$GIT_DIR` is set to point to this private
332 directory (e.g. `/path/main/.git/worktrees/test-next` in the example) and
333 -`$GIT_COMMON_DIR` is set to point back to the main working tree's `$GIT_DIR`
333 +`$GIT_COMMON_DIR` is set to point back to the main worktree's `$GIT_DIR`
334 (e.g. `/path/main/.git`). These settings are made in a `.git` file located at
335 -the top directory of the linked working tree.
335 +the top directory of the linked worktree.
336
337 Path resolution via `git rev-parse --git-path` uses either
338 `$GIT_DIR` or `$GIT_COMMON_DIR` depending on the path. For example, in the
339 -linked working tree `git rev-parse --git-path HEAD` returns
339 +linked worktree `git rev-parse --git-path HEAD` returns
340 `/path/main/.git/worktrees/test-next/HEAD` (not
341 `/path/other/test-next/.git/HEAD` or `/path/main/.git/HEAD`) while `git
342 rev-parse --git-path refs/heads/master` uses
343 `$GIT_COMMON_DIR` and returns `/path/main/.git/refs/heads/master`,
344 -since refs are shared across all working trees, except `refs/bisect` and
344 +since refs are shared across all worktrees, except `refs/bisect` and
345 `refs/worktree`.
346
347 See linkgit:gitrepository-layout[5] for more information. The rule of
@@ -349,8 +349,8 @@ thumb is do not make any assumption about whether a path belongs to
349 `$GIT_DIR` or `$GIT_COMMON_DIR` when you need to directly access something
350 inside `$GIT_DIR`. Use `git rev-parse --git-path` to get the final path.
351
352 -If you manually move a linked working tree, you need to update the `gitdir` file
353 -in the entry's directory. For example, if a linked working tree is moved
352 +If you manually move a linked worktree, you need to update the `gitdir` file
353 +in the entry's directory. For example, if a linked worktree is moved
354 to `/newpath/test-next` and its `.git` file points to
355 `/path/main/.git/worktrees/test-next`, then update
356 `/path/main/.git/worktrees/test-next/gitdir` to reference `/newpath/test-next`
@@ -359,10 +359,10 @@ automatically.
359
360 To prevent a `$GIT_DIR/worktrees` entry from being pruned (which
361 can be useful in some situations, such as when the
362 -entry's working tree is stored on a portable device), use the
362 +entry's worktree is stored on a portable device), use the
363 `git worktree lock` command, which adds a file named
364 `locked` to the entry's directory. The file contains the reason in
365 -plain text. For example, if a linked working tree's `.git` file points
365 +plain text. For example, if a linked worktree's `.git` file points
366 to `/path/main/.git/worktrees/test-next` then a file named
367 `/path/main/.git/worktrees/test-next/locked` will prevent the
368 `test-next` entry from being pruned. See