user-manual: move object format details to hacking-git chapter
authorJ. Bruce Fields <bfields@citi.umich.edu>
Fri, 31 Aug 2007 03:07:05 +0000 (23:07 -0400)
committerJ. Bruce Fields <bfields@citi.umich.edu>
Sun, 16 Sep 2007 02:13:31 +0000 (22:13 -0400)
Most of this is probably only of interest to git developers.

Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Documentation/user-manual.txt
index 75f23709f835d53a4404abb5726f4660c425682a..f7457ef487c71b4e4bec564c5b65b1b12d6ce121 100644 (file)
@@ -2760,29 +2760,6 @@ used to sign other objects. It contains the identifier and type of
 another object, a symbolic name (of course!) and, optionally, a
 signature.
 
 another object, a symbolic name (of course!) and, optionally, a
 signature.
 
-Regardless of object type, all objects share the following
-characteristics: they are all deflated with zlib, and have a header
-that not only specifies their type, but also provides size information
-about the data in the object.  It's worth noting that the SHA1 hash
-that is used to name the object is the hash of the original data
-plus this header, so `sha1sum` 'file' does not match the object name
-for 'file'.
-(Historical note: in the dawn of the age of git the hash
-was the sha1 of the 'compressed' object.)
-
-As a result, the general consistency of an object can always be tested
-independently of the contents or the type of the object: all objects can
-be validated by verifying that (a) their hashes match the content of the
-file and (b) the object successfully inflates to a stream of bytes that
-forms a sequence of <ascii type without space> {plus} <space> {plus} <ascii decimal
-size> {plus} <byte\0> {plus} <binary object data>.
-
-The structured objects can further have their structure and
-connectivity to other objects verified. This is generally done with
-the `git-fsck` program, which generates a full dependency graph
-of all objects, and verifies their internal consistency (in addition
-to just verifying their superficial consistency through the hash).
-
 The object types in some more detail:
 
 [[blob-object]]
 The object types in some more detail:
 
 [[blob-object]]
@@ -3481,6 +3458,38 @@ Hacking git
 This chapter covers internal details of the git implementation which
 probably only git developers need to understand.
 
 This chapter covers internal details of the git implementation which
 probably only git developers need to understand.
 
+[[object-details]]
+Object storage format
+---------------------
+
+All objects have a statically determined "type" which identifies the
+format of the object (i.e. how it is used, and how it can refer to other
+objects).  There are currently four different object types: "blob",
+"tree", "commit", and "tag".
+
+Regardless of object type, all objects share the following
+characteristics: they are all deflated with zlib, and have a header
+that not only specifies their type, but also provides size information
+about the data in the object.  It's worth noting that the SHA1 hash
+that is used to name the object is the hash of the original data
+plus this header, so `sha1sum` 'file' does not match the object name
+for 'file'.
+(Historical note: in the dawn of the age of git the hash
+was the sha1 of the 'compressed' object.)
+
+As a result, the general consistency of an object can always be tested
+independently of the contents or the type of the object: all objects can
+be validated by verifying that (a) their hashes match the content of the
+file and (b) the object successfully inflates to a stream of bytes that
+forms a sequence of <ascii type without space> {plus} <space> {plus} <ascii decimal
+size> {plus} <byte\0> {plus} <binary object data>.
+
+The structured objects can further have their structure and
+connectivity to other objects verified. This is generally done with
+the `git-fsck` program, which generates a full dependency graph
+of all objects, and verifies their internal consistency (in addition
+to just verifying their superficial consistency through the hash).
+
 [[birdview-on-the-source-code]]
 A birds-eye view of Git's source code
 -------------------------------------
 [[birdview-on-the-source-code]]
 A birds-eye view of Git's source code
 -------------------------------------