Cjku/git: Difference between revisions

32 bytes added ,  30 October 2014
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 associate with another object?
# 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 onto mine
#* 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. Only if those two commit stay different path of commit graphs.
#* 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 status.
#* Yes, enter detached branch state.


===object type===
===object type===
Confirmed users
1,643

edits