Revert "lib/sha1: use the git implementation of SHA-1"

This reverts commit aefcb0a09ea3f3b3b0b041f028eef9841fcaa58c.