gogs / git

Package GoGits - Git is a pure Go implementation of Git manipulation.
Apache License 2.0
176 stars 32 forks source link

Fixed a weird invocation of crypto/sha1 which was causing a panic. #16

Closed driusan closed 8 years ago

driusan commented 8 years ago

When "StoreObjectSHA1" was called it was using a weird invocation of crypto/sha1 by importing crypto and trying to use crypto.SHA1.New instead of importing crypto/sha1 and using sha1.New. This was causing a panic with the error "panic: crypto: requested hash function #3 is unavailable"

This updates the call to use the crypto/sha1 package as documented in the go docs.

unknwon commented 8 years ago

Thanks!