@matheusbsbs / matheus-bagliano / commits / 513d419c59
Fork 0

user-manual: reorder commit, blob, tree discussion

The bottom-up blog, tree, commit order makes sense unless you want to give explicit examples--it's easier to discover objects to examine if you go in the other order...., Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>

J. Bruce Fields committed Aug 31, 2007 at 23:26 UTC 513d419c5989b8aaeec1cb1ed356519370079dc1
1 file changed +41 -41
Documentation/user-manual.txt
+41 -41
@@ -2766,27 +2766,32 @@ signature.
2766
2767 The object types in some more detail:
2768
2769 -[[blob-object]]
2770 -Blob Object
2771 -~~~~~~~~~~~
2769 +[[commit-object]]
2770 +Commit Object
2771 +~~~~~~~~~~~~~
2772
2773 -A "blob" object is nothing but a binary blob of data, and doesn't
2774 -refer to anything else. There is no signature or any other
2775 -verification of the data, so while the object is consistent (it 'is'
2776 -indexed by its sha1 hash, so the data itself is certainly correct), it
2777 -has absolutely no other attributes. No name associations, no
2778 -permissions. It is purely a blob of data (i.e. normally "file
2779 -contents").
2773 +The "commit" object is an object that introduces the notion of
2774 +history into the picture. In contrast to the other objects, it
2775 +doesn't just describe the physical state of a tree, it describes how
2776 +we got there, and why.
2777
2781 -In particular, since the blob is entirely defined by its data, if two
2782 -files in a directory tree (or in multiple different versions of the
2783 -repository) have the same contents, they will share the same blob
2784 -object. The object is totally independent of its location in the
2785 -directory tree, and renaming a file does not change the object that
2786 -file is associated with in any way.
2778 +A "commit" is defined by the tree-object that it results in, the
2779 +parent commits (zero, one or more) that led up to that point, and a
2780 +comment on what happened. Again, a commit is not trusted per se:
2781 +the contents are well-defined and "safe" due to the cryptographically
2782 +strong signatures at all levels, but there is no reason to believe
2783 +that the tree is "good" or that the merge information makes sense.
2784 +The parents do not have to actually have any relationship with the
2785 +result, for example.
2786
2788 -A blob is typically created when gitlink:git-update-index[1]
2789 -is run, and its data can be accessed by gitlink:git-cat-file[1].
2787 +Note on commits: unlike some SCM's, commits do not contain
2788 +rename information or file mode change information. All of that is
2789 +implicit in the trees involved (the result tree, and the result trees
2790 +of the parents), and describing that makes no sense in this idiotic
2791 +file manager.
2792 +
2793 +A commit is created with gitlink:git-commit-tree[1] and
2794 +its data can be accessed by gitlink:git-cat-file[1].
2795
2796 [[tree-object]]
2797 Tree Object
@@ -2830,32 +2835,27 @@ A tree is created with gitlink:git-write-tree[1] and
2835 its data can be accessed by gitlink:git-ls-tree[1].
2836 Two trees can be compared with gitlink:git-diff-tree[1].
2837
2833 -[[commit-object]]
2834 -Commit Object
2835 -~~~~~~~~~~~~~
2836 -
2837 -The "commit" object is an object that introduces the notion of
2838 -history into the picture. In contrast to the other objects, it
2839 -doesn't just describe the physical state of a tree, it describes how
2840 -we got there, and why.
2838 +[[blob-object]]
2839 +Blob Object
2840 +~~~~~~~~~~~
2841
2842 -A "commit" is defined by the tree-object that it results in, the
2843 -parent commits (zero, one or more) that led up to that point, and a
2844 -comment on what happened. Again, a commit is not trusted per se:
2845 -the contents are well-defined and "safe" due to the cryptographically
2846 -strong signatures at all levels, but there is no reason to believe
2847 -that the tree is "good" or that the merge information makes sense.
2848 -The parents do not have to actually have any relationship with the
2849 -result, for example.
2842 +A "blob" object is nothing but a binary blob of data, and doesn't
2843 +refer to anything else. There is no signature or any other
2844 +verification of the data, so while the object is consistent (it 'is'
2845 +indexed by its sha1 hash, so the data itself is certainly correct), it
2846 +has absolutely no other attributes. No name associations, no
2847 +permissions. It is purely a blob of data (i.e. normally "file
2848 +contents").
2849
2851 -Note on commits: unlike some SCM's, commits do not contain
2852 -rename information or file mode change information. All of that is
2853 -implicit in the trees involved (the result tree, and the result trees
2854 -of the parents), and describing that makes no sense in this idiotic
2855 -file manager.
2850 +In particular, since the blob is entirely defined by its data, if two
2851 +files in a directory tree (or in multiple different versions of the
2852 +repository) have the same contents, they will share the same blob
2853 +object. The object is totally independent of its location in the
2854 +directory tree, and renaming a file does not change the object that
2855 +file is associated with in any way.
2856
2857 -A commit is created with gitlink:git-commit-tree[1] and
2858 -its data can be accessed by gitlink:git-cat-file[1].
2857 +A blob is typically created when gitlink:git-update-index[1]
2858 +is run, and its data can be accessed by gitlink:git-cat-file[1].
2859
2860 [[trust]]
2861 Trust