title: Why does git hash-object return a different hash than openssl sha1?
body: <p>Context: I downloaded <a href="http://code.google.com/p/audirvana/downloads/detail?name=Audirvana%200.7.1.zip&amp;can=2&amp;q=" rel="noreferrer">a file (Audirvana 0.7.1.zip)</a> from code.google to my Macbook Pro (Mac OS X 10.6.6).</p>
  
  <p>I wanted to verify the checksum, which for that particular file is posted as 862456662a11e2f386ff0b24fdabcb4f6c1c446a (SHA-1).  <code>git hash-object</code> gave me a different hash, but <code>openssl sha1</code> returned the expected 862456662a11e2f386ff0b24fdabcb4f6c1c446a.</p>
  
  <p>The following experiment seems to rule out any possible download corruption or newline differences and to indicate that there are actually two different algorithms at play:</p>
  
  <pre><code>$ echo A &gt; foo.txt
  $ cat foo.txt
  A
  $ git hash-object foo.txt 
  f70f10e4db19068f79bc43844b49f3eece45c4e8
  $ openssl sha1 foo.txt 
  SHA1(foo.txt)= 7d157d7c000ae27db146575c08ce30df893d3a64
  </code></pre>
  
  <p>What's going on?</p>