Well, looks like this guy was wrong:
https://lwn.net/Articles/307281/Copy-pasting for posterity:
I've been informed by the git Gods that the chances of a
SHA1 collision is the same as the Earth being sucked up into
the black hole created by the CERN accelerator. If this is
indeed true, then there's no need for that extra memcmp.