Skip to content

Commit 4b6acde

Browse files
rhansengitster
authored andcommitted
glossary: fix and clarify the definition of 'ref'
Signed-off-by: Richard Hansen <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent abdb54a commit 4b6acde

File tree

1 file changed

+14
-4
lines changed

1 file changed

+14
-4
lines changed

Documentation/glossary-content.txt

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -395,10 +395,20 @@ should not be combined with other pathspec.
395395
to the result.
396396

397397
[[def_ref]]ref::
398-
A 40-byte hex representation of a <<def_SHA1,SHA-1>> or a name that
399-
denotes a particular <<def_object,object>>. They may be stored in
400-
a file under `$GIT_DIR/refs/` directory, or
401-
in the `$GIT_DIR/packed-refs` file.
398+
A name that begins with `refs/` (e.g. `refs/heads/master`)
399+
that points to an <<def_object_name,object name>> or another
400+
ref (the latter is called a <<def_symref,symbolic ref>>).
401+
For convenience, a ref can sometimes be abbreviated when used
402+
as an argument to a Git command; see linkgit:gitrevisions[7]
403+
for details.
404+
Refs are stored in the <<def_repository,repository>>.
405+
+
406+
The ref namespace is hierarchical.
407+
Different subhierarchies are used for different purposes (e.g. the
408+
`refs/heads/` hierarchy is used to represent local branches).
409+
+
410+
There are a few special-purpose refs that do not begin with `refs/`.
411+
The most notable example is `HEAD`.
402412

403413
[[def_reflog]]reflog::
404414
A reflog shows the local "history" of a ref. In other words,

0 commit comments

Comments
 (0)