title: how to generate sha1 similar to git hash-object command
body: <p>Any idea why git hash-object has different outcome from shasum and openssl commands ? </p>
  
  <pre><code>➜ printf test | shasum
  a94a8fe5ccb19ba61c4c0873d391e987982fbbd3  -
  
  ➜  printf test | git hash-object --stdin
  30d74d258442c7c65512eafab474568dd706c430
  
  ➜  echo -n "test" | shasum
  a94a8fe5ccb19ba61c4c0873d391e987982fbbd3  -
  </code></pre>