The SHA1 hashes stored in the tree objects (as returned by git ls-tree
) do not match the SHA1 hashes of the file content (as returned by sha1sum
)
$ git cat-file blob 4716ca912495c805b94a88ef6dc3fb4aff46bf3c | sha1sum
de20247992af0f949ae8df4fa9a37e4a03d7063e -
How does git compute file hashes? Does it compress the content before computing the hash?
Question&Answers:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…