【发布时间】:2011-11-05 17:18:24
【问题描述】:
存储在树对象中的 SHA1 哈希值(git ls-tree 返回的)与文件内容的 SHA1 哈希值(sha1sum 返回的)不匹配
$ git cat-file blob 4716ca912495c805b94a88ef6dc3fb4aff46bf3c | sha1sum
de20247992af0f949ae8df4fa9a37e4a03d7063e -
git 如何计算文件哈希?它会在计算哈希之前压缩内容吗?
【问题讨论】:
-
更多详情,另见progit.org/book/ch9-2.html
-
netvope 的链接现在似乎已失效。我认为这是新位置:git-scm.com/book/en/Git-Internals-Git-Objects 这是来自git-scm.com/book 的§9.2
标签: git hash sha1 checksum git-hash