Add hash() function

* Not sha1 like real git.  Just simple and short.
hash-object returns hashed file contents if no -w