Skip to content

Commit 893dce2

Browse files
vdyegitster
authored andcommitted
glossary: add definitions for dereference & peel
Add 'gitglossary' definitions for "dereference" (as it used for both symrefs and objects) and "peel". These terms are used in options and documentation throughout Git, but they are not clearly defined anywhere and the behavior they refer to depends heavily on context. Provide explicit definitions to clarify existing documentation to users and help contributors to use the most appropriate terminology possible in their additions to Git. Update other definitions in the glossary that use the term "dereference" to link to 'def_dereference'. Signed-off-by: Victoria Dye <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 61a22dd commit 893dce2

File tree

1 file changed

+35
-14
lines changed

1 file changed

+35
-14
lines changed

Documentation/glossary-content.txt

Lines changed: 35 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -98,9 +98,8 @@ to point at the new commit.
9898
revision.
9999

100100
[[def_commit-ish]]commit-ish (also committish)::
101-
A <<def_commit_object,commit object>> or an
102-
<<def_object,object>> that can be recursively dereferenced to
103-
a commit object.
101+
A <<def_commit_object,commit object>> or an <<def_object,object>> that
102+
can be recursively <<def_dereference,dereferenced>> to a commit object.
104103
The following are all commit-ishes:
105104
a commit object,
106105
a <<def_tag_object,tag object>> that points to a commit
@@ -125,6 +124,25 @@ to point at the new commit.
125124
dangling object has no references to it from any
126125
reference or <<def_object,object>> in the <<def_repository,repository>>.
127126

127+
[[def_dereference]]dereference::
128+
Referring to a <<def_symref,symbolic ref>>: the action of accessing the
129+
<<def_ref,reference>> pointed at by a symbolic ref. Recursive
130+
dereferencing involves repeating the aforementioned process on the
131+
resulting ref until a non-symbolic reference is found.
132+
+
133+
Referring to a <<def_tag_object,tag object>>: the action of accessing the
134+
<<def_object,object>> a tag points at. Tags are recursively dereferenced by
135+
repeating the operation on the result object until the result has either a
136+
specified <<def_object_type,object type>> (where applicable) or any non-"tag"
137+
object type. A synonym for "recursive dereference" in the context of tags is
138+
"<<def_peel,peel>>".
139+
+
140+
Referring to a <<def_commit_object,commit object>>: the action of accessing
141+
the commit's tree object. Commits cannot be dereferenced recursively.
142+
+
143+
Unless otherwise specified, "dereferencing" as it used in the context of Git
144+
commands or protocols is implicitly recursive.
145+
128146
[[def_detached_HEAD]]detached HEAD::
129147
Normally the <<def_HEAD,HEAD>> stores the name of a
130148
<<def_branch,branch>>, and commands that operate on the
@@ -444,6 +462,10 @@ exclude;;
444462
of the logical predecessor(s) in the line of development, i.e. its
445463
parents.
446464

465+
[[def_peel]]peel::
466+
The action of recursively <<def_dereference,dereferencing>> a
467+
<<def_tag_object,tag object>>.
468+
447469
[[def_pickaxe]]pickaxe::
448470
The term <<def_pickaxe,pickaxe>> refers to an option to the diffcore
449471
routines that help select changes that add or delete a given text
@@ -620,12 +642,11 @@ The most notable example is `HEAD`.
620642
copies of) commit objects of the contained submodules.
621643

622644
[[def_symref]]symref::
623-
Symbolic reference: instead of containing the <<def_SHA1,SHA-1>>
624-
id itself, it is of the format 'ref: refs/some/thing' and when
625-
referenced, it recursively dereferences to this reference.
626-
'<<def_HEAD,HEAD>>' is a prime example of a symref. Symbolic
627-
references are manipulated with the linkgit:git-symbolic-ref[1]
628-
command.
645+
Symbolic reference: instead of containing the <<def_SHA1,SHA-1>> id
646+
itself, it is of the format 'ref: refs/some/thing' and when referenced,
647+
it recursively <<def_dereference,dereferences>> to this reference.
648+
'<<def_HEAD,HEAD>>' is a prime example of a symref. Symbolic references
649+
are manipulated with the linkgit:git-symbolic-ref[1] command.
629650

630651
[[def_tag]]tag::
631652
A <<def_ref,ref>> under `refs/tags/` namespace that points to an
@@ -661,11 +682,11 @@ The most notable example is `HEAD`.
661682
<<def_tree,tree>> is equivalent to a <<def_directory,directory>>.
662683

663684
[[def_tree-ish]]tree-ish (also treeish)::
664-
A <<def_tree_object,tree object>> or an <<def_object,object>>
665-
that can be recursively dereferenced to a tree object.
666-
Dereferencing a <<def_commit_object,commit object>> yields the
667-
tree object corresponding to the <<def_revision,revision>>'s
668-
top <<def_directory,directory>>.
685+
A <<def_tree_object,tree object>> or an <<def_object,object>> that can
686+
be recursively <<def_dereference,dereferenced>> to a tree object.
687+
Dereferencing a <<def_commit_object,commit object>> yields the tree
688+
object corresponding to the <<def_revision,revision>>'s top
689+
<<def_directory,directory>>.
669690
The following are all tree-ishes:
670691
a <<def_commit-ish,commit-ish>>,
671692
a tree object,

0 commit comments

Comments
 (0)