提交 35121930 编写于 作者: J J. Bruce Fields 提交者: Junio C Hamano

user-manual: insert earlier of mention content-addressable architecture

The content-addressable design is too important not to be worth at least
a brief mention a little earlier on.
Signed-off-by: N"J. Bruce Fields" <bfields@citi.umich.edu>
Signed-off-by: NJunio C Hamano <junkio@cox.net>
上级 1c95c565
...@@ -391,15 +391,20 @@ index 8be626f..d7aac9d 100644 ...@@ -391,15 +391,20 @@ index 8be626f..d7aac9d 100644
As you can see, a commit shows who made the latest change, what they As you can see, a commit shows who made the latest change, what they
did, and why. did, and why.
Every commit has a 40-hexdigit id, sometimes called the "object name" Every commit has a 40-hexdigit id, sometimes called the "object name" or the
or the "SHA1 id", shown on the first line of the "git show" output. "SHA1 id", shown on the first line of the "git show" output. You can usually
You can usually refer to a commit by a shorter name, such as a tag or a refer to a commit by a shorter name, such as a tag or a branch name, but this
branch name, but this longer name can also be useful. Most longer name can also be useful. Most importantly, it is a globally unique
importantly, it is a globally unique name for this commit: so if you name for this commit: so if you tell somebody else the object name (for
tell somebody else the object name (for example in email), then you are example in email), then you are guaranteed that name will refer to the same
guaranteed that name will refer to the same commit in their repository commit in their repository that it does in yours (assuming their repository
that it does in yours (assuming their repository has that commit at has that commit at all). Since the object name is computed as a hash over the
all). contents of the commit, you are guaranteed that the commit can never change
without its name also changing.
In fact, in <<git-internals>> we shall see that everything stored in git
history, including file data and directory contents, is stored in an object
with a name that is a hash of its contents.
Understanding history: commits, parents, and reachability Understanding history: commits, parents, and reachability
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
...@@ -2155,6 +2160,7 @@ See gitlink:git-config[1] for more details on the configuration ...@@ -2155,6 +2160,7 @@ See gitlink:git-config[1] for more details on the configuration
options mentioned above. options mentioned above.
[[git-internals]]
Git internals Git internals
============= =============
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册