Confirmed users
1,643
edits
| Line 18: | Line 18: | ||
[[File:Gitclassdiagram.png| center |thumb|800px|Figure 2. git class diagram]] | [[File:Gitclassdiagram.png| center |thumb|800px|Figure 2. git class diagram]] | ||
# Is it possible that a commit does not | # Is it possible that a commit does not refer to another commit object? | ||
#* yes, root commit object | #* yes, the root commit object | ||
# Is it possible that a commit does not refer to a tree? | # Is it possible that a commit does not refer to a tree? | ||
#* No, unless you step | #* No, unless you step on a mine | ||
# Is it possible that two commits point to the same tree? | # Is it possible that two commits point to the same tree? | ||
#* Yes. | #* Yes. but only if those two commits are not on the same path in commit graphs. | ||
# Is it possible that HEAD is empty | # Is it possible that HEAD is empty? | ||
#* Yes, after git-init before the first commit | #* Yes, after git-init and before the first commit | ||
# Is it possible that a tree does not refer to any blobs? | # Is it possible that a tree does not refer to any blobs? | ||
#* No, no content no tree. git stores content instead of file. | #* No, no content no tree. git stores content instead of file. | ||
# Is it possible that a tree point to a commit? | # Is it possible that a tree point to a commit? | ||
#* No, anti DAG pattern and does not make sense. | #* No, anti DAG pattern and does not make sense at all. | ||
# Is it possible that HEAD refers to branch name directly? | # Is it possible that HEAD refers to branch name directly? | ||
#* Yes, detached branch | #* Yes, enter detached branch state. | ||
===object type=== | ===object type=== | ||