@@ -32,8 +32,8 @@ build up a hierarchy of objects.
3232All objects have a statically determined "type" aka "tag", which is
3333determined at object creation time, and which identifies the format of
3434the object (i.e. how it is used, and how it can refer to other
35- objects). There are currently four different object types: "blob",
36- "tree", "commit" and "tag".
35+ objects). There are currently five different object types: "blob",
36+ "tree", "commit", "tag" and "delta"
3737
3838A "blob" object cannot refer to any other object, and is, like the tag
3939implies, a pure storage object containing some user data. It is used to
@@ -62,13 +62,17 @@ A "tag" object symbolically identifies and can be used to sign other
6262objects. It contains the identifier and type of another object, a
6363symbolic name (of course!) and, optionally, a signature.
6464
65- Regardless of object type, all objects are share the following
66- characteristics: they are all in deflated with zlib, and have a header
67- that not only specifies their tag, but also size information about the
68- data in the object. It's worth noting that the SHA1 hash that is used
69- to name the object is the hash of the original data (historical note:
70- in the dawn of the age of git this was the sha1 of the _compressed_
71- object)
65+ A "delta" object is used internally by the object database to minimise
66+ disk usage. Instead of storing the entire contents of a revision, git
67+ can behave in a similar manner to RCS et al and simply store a delta.
68+
69+ Regardless of object type, all objects share the following
70+ characteristics: they are all deflated with zlib, and have a header
71+ that not only specifies their tag, but also provides size information
72+ about the data in the object. It's worth noting that the SHA1 hash
73+ that is used to name the object is the hash of the original data or
74+ the delta. (Historical note: in the dawn of the age of git the hash
75+ was the sha1 of the _compressed_ object)
7276
7377As a result, the general consistency of an object can always be tested
7478independently of the contents or the type of the object: all objects can
@@ -215,6 +219,30 @@ verification) has to come from outside.
215219A tag is created with link:git-mktag.html[git-mktag] and
216220it's data can be accessed by link:git-cat-file.html[git-cat-file]
217221
222+ Delta Object
223+ ~~~~~~~~~~~~
224+
225+ The "delta" object is used internally by the object database to
226+ minimise storage usage by using xdeltas (byte level diffs). Deltas can
227+ form chains of arbitrary length as RCS does (although this is
228+ configureable at creation time). Most operations won't see or even be
229+ aware of delta objects as they are automatically 'applied' and appear
230+ as 'real' git objects In other words, if you write your own routines
231+ to look at the contents of the object database then you need to know
232+ about this - otherwise you don't. Actually, that's not quite true -
233+ one important area where deltas are likely to prove very valuable is
234+ in reducing bandwidth loads - so the more sophisticated network tools
235+ for git repositories will be aware of them too.
236+
237+ Finally, git repositories can (and must) be deltafied in the
238+ background - the work to calculate the differences does not take place
239+ automatically at commit time.
240+
241+ A delta can be created (or undeltafied) with
242+ link:git-mkdelta.html[git-mkdelta] it's raw data cannot be accessed at
243+ present.
244+
245+
218246The "index" aka "Current Directory Cache"
219247-----------------------------------------
220248The index is a simple binary file, which contains an efficient
0 commit comments