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

This reverts commit 9025b9cabca81a93edfc2ba34b5febc0bbf41e95.