title: How does Git compute file hashes?
body: <p>The SHA1 hashes stored in the tree objects (as returned by <code>git ls-tree</code>) do not match the SHA1 hashes of the file content (as returned by <code>sha1sum</code>):</p>
  <pre><code>$ git cat-file blob 4716ca912495c805b94a88ef6dc3fb4aff46bf3c | sha1sum
  de20247992af0f949ae8df4fa9a37e4a03d7063e  -
  </code></pre>
  <p>How does Git compute file hashes? Does it compress the content before computing the hash?</p>