Skip to content

Commit a536b08

Browse files
J. Bruce FieldsJunio C Hamano
authored andcommitted
user-manual: start revising "internals" chapter
Minor revisions, cross-references. Signed-off-by: "J. Bruce Fields" <bfields@citi.umich.edu> Signed-off-by: Junio C Hamano <junkio@cox.net>
1 parent 72a76c9 commit a536b08

File tree

1 file changed

+20
-18
lines changed

1 file changed

+20
-18
lines changed

Documentation/user-manual.txt

Lines changed: 20 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2315,8 +2315,8 @@ options mentioned above.
23152315
Git internals
23162316
=============
23172317

2318-
There are two object abstractions: the "object database", and the
2319-
"current directory cache" aka "index".
2318+
Git depends on two fundamental abstractions: the "object database", and
2319+
the "current directory cache" aka "index".
23202320

23212321
The Object Database
23222322
-------------------
@@ -2331,22 +2331,23 @@ All objects have a statically determined "type" aka "tag", which is
23312331
determined at object creation time, and which identifies the format of
23322332
the object (i.e. how it is used, and how it can refer to other
23332333
objects). There are currently four different object types: "blob",
2334-
"tree", "commit" and "tag".
2334+
"tree", "commit", and "tag".
23352335

2336-
A "blob" object cannot refer to any other object, and is, like the type
2337-
implies, a pure storage object containing some user data. It is used to
2338-
actually store the file data, i.e. a blob object is associated with some
2339-
particular version of some file.
2336+
A <<def_blob_object,"blob" object>> cannot refer to any other object,
2337+
and is, as the name implies, a pure storage object containing some
2338+
user data. It is used to actually store the file data, i.e. a blob
2339+
object is associated with some particular version of some file.
23402340

2341-
A "tree" object is an object that ties one or more "blob" objects into a
2342-
directory structure. In addition, a tree object can refer to other tree
2343-
objects, thus creating a directory hierarchy.
2341+
A <<def_tree_object,"tree" object>> is an object that ties one or more
2342+
"blob" objects into a directory structure. In addition, a tree object
2343+
can refer to other tree objects, thus creating a directory hierarchy.
23442344

2345-
A "commit" object ties such directory hierarchies together into
2346-
a DAG of revisions - each "commit" is associated with exactly one tree
2347-
(the directory hierarchy at the time of the commit). In addition, a
2348-
"commit" refers to one or more "parent" commit objects that describe the
2349-
history of how we arrived at that directory hierarchy.
2345+
A <<def_commit_object,"commit" object>> ties such directory hierarchies
2346+
together into a <<def_DAG,directed acyclic graph>> of revisions - each
2347+
"commit" is associated with exactly one tree (the directory hierarchy at
2348+
the time of the commit). In addition, a "commit" refers to one or more
2349+
"parent" commit objects that describe the history of how we arrived at
2350+
that directory hierarchy.
23502351

23512352
As a special case, a commit object with no parents is called the "root"
23522353
object, and is the point of an initial project commit. Each project
@@ -2356,9 +2357,10 @@ has two or more separate roots as its ultimate parents, that's probably
23562357
just going to confuse people. So aim for the notion of "one root object
23572358
per project", even if git itself does not enforce that.
23582359

2359-
A "tag" object symbolically identifies and can be used to sign other
2360-
objects. It contains the identifier and type of another object, a
2361-
symbolic name (of course!) and, optionally, a signature.
2360+
A <<def_tag_object,"tag" object>> symbolically identifies and can be
2361+
used to sign other objects. It contains the identifier and type of
2362+
another object, a symbolic name (of course!) and, optionally, a
2363+
signature.
23622364

23632365
Regardless of object type, all objects share the following
23642366
characteristics: they are all deflated with zlib, and have a header

0 commit comments

Comments
 (0)