user-manual: move object format details to hacking-git chapter
Most of this is probably only of interest to git developers. Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
J. Bruce Fields committed
Aug 30, 2007 at 23:07 UTC
f2327c6c52d4d523312dc32c143d2c29131ea24e
1 file changed
+32
-23
Documentation/user-manual.txt
+32
-23
@@ -2760,29 +2760,6 @@ used to sign other objects. It contains the identifier and type of
2760
another object, a symbolic name (of course!) and, optionally, a
2761
signature.
2762
2763
-Regardless of object type, all objects share the following
2764
-characteristics: they are all deflated with zlib, and have a header
2765
-that not only specifies their type, but also provides size information
2766
-about the data in the object. It's worth noting that the SHA1 hash
2767
-that is used to name the object is the hash of the original data
2768
-plus this header, so `sha1sum` 'file' does not match the object name
2769
-for 'file'.
2770
-(Historical note: in the dawn of the age of git the hash
2771
-was the sha1 of the 'compressed' object.)
2772
-
2773
-As a result, the general consistency of an object can always be tested
2774
-independently of the contents or the type of the object: all objects can
2775
-be validated by verifying that (a) their hashes match the content of the
2776
-file and (b) the object successfully inflates to a stream of bytes that
2777
-forms a sequence of <ascii type without space> {plus} <space> {plus} <ascii decimal
2778
-size> {plus} <byte\0> {plus} <binary object data>.
2779
-
2780
-The structured objects can further have their structure and
2781
-connectivity to other objects verified. This is generally done with
2782
-the `git-fsck` program, which generates a full dependency graph
2783
-of all objects, and verifies their internal consistency (in addition
2784
-to just verifying their superficial consistency through the hash).
2785
-
2763
The object types in some more detail:
2764
2765
[[blob-object]]
@@ -3481,6 +3458,38 @@ Hacking git
3458
This chapter covers internal details of the git implementation which
3459
probably only git developers need to understand.
3460
3461
+[[object-details]]
3462
+Object storage format
3463
+---------------------
3464
+
3465
+All objects have a statically determined "type" which identifies the
3466
+format of the object (i.e. how it is used, and how it can refer to other
3467
+objects). There are currently four different object types: "blob",
3468
+"tree", "commit", and "tag".
3469
+
3470
+Regardless of object type, all objects share the following
3471
+characteristics: they are all deflated with zlib, and have a header
3472
+that not only specifies their type, but also provides size information
3473
+about the data in the object. It's worth noting that the SHA1 hash
3474
+that is used to name the object is the hash of the original data
3475
+plus this header, so `sha1sum` 'file' does not match the object name
3476
+for 'file'.
3477
+(Historical note: in the dawn of the age of git the hash
3478
+was the sha1 of the 'compressed' object.)
3479
+
3480
+As a result, the general consistency of an object can always be tested
3481
+independently of the contents or the type of the object: all objects can
3482
+be validated by verifying that (a) their hashes match the content of the
3483
+file and (b) the object successfully inflates to a stream of bytes that
3484
+forms a sequence of <ascii type without space> {plus} <space> {plus} <ascii decimal
3485
+size> {plus} <byte\0> {plus} <binary object data>.
3486
+
3487
+The structured objects can further have their structure and
3488
+connectivity to other objects verified. This is generally done with
3489
+the `git-fsck` program, which generates a full dependency graph
3490
+of all objects, and verifies their internal consistency (in addition
3491
+to just verifying their superficial consistency through the hash).
3492
+
3493
[[birdview-on-the-source-code]]
3494
A birds-eye view of Git's source code
3495
-------------------------------------