glossary: describe "worktree"

We have description on "per worktree ref", but "worktree" is not described in the glossary. We do have "working tree", though. Casually put, a "working tree" is what your editor and compiler interacts with. "worktree" is a mechanism to allow one or more "working tree"s to be attached to a repository and used to check out different commits and branches independently, which includes not just a "working tree" but also repository metadata like HEAD, the index to support simultaneous use of them. Historically, we used these terms interchangeably but we have been trying to use "working tree" when we mean it, instead of "worktree". Most of the existing references to "working tree" in the glossary do refer primarily to the working tree portion, except for one that said refs like HEAD and refs/bisect/* are per "working tree", but it is more precise to say they are per "worktree". Signed-off-by: Junio C Hamano <gitster@pobox.com>

Junio C Hamano committed Feb 9, 2022 at 18:19 UTC 2df5387ed04159b188de65dff9654d4aae1062d2
1 file changed +11 -2
Documentation/glossary-content.txt
+11 -2
@@ -312,7 +312,7 @@ Pathspecs are used on the command line of "git ls-files", "git
312 ls-tree", "git add", "git grep", "git diff", "git checkout",
313 and many other commands to
314 limit the scope of operations to some subset of the tree or
315 -worktree. See the documentation of each command for whether
315 +working tree. See the documentation of each command for whether
316 paths are relative to the current directory or toplevel. The
317 pathspec syntax is as follows:
318 +
@@ -446,7 +446,7 @@ exclude;;
446 interface than the <<def_plumbing,plumbing>>.
447
448 [[def_per_worktree_ref]]per-worktree ref::
449 - Refs that are per-<<def_working_tree,worktree>>, rather than
449 + Refs that are per-<<def_worktree,worktree>>, rather than
450 global. This is presently only <<def_HEAD,HEAD>> and any refs
451 that start with `refs/bisect/`, but might later include other
452 unusual refs.
@@ -669,3 +669,12 @@ The most notable example is `HEAD`.
669 The tree of actual checked out files. The working tree normally
670 contains the contents of the <<def_HEAD,HEAD>> commit's tree,
671 plus any local changes that you have made but not yet committed.
672 +
673 +[[def_worktree]]worktree::
674 + A repository can have zero (i.e. bare repository) or one or
675 + more worktrees attached to it. One "worktree" consists of a
676 + "working tree" and repository metadata, most of which are
677 + shared among other worktrees of a single repository, and
678 + some of which are maintained separately per worktree
679 + (e.g. the index, HEAD and pseudorefs like MERGE_HEAD,
680 + per-worktree refs and per-worktree configuration file).