Git 2.13 can now detect SHA1 collisions: https://github.com/blog/2360-git-2-13-has-been-released
(and rejects the content, which sounds more like a workaround to me, but hey, steps in the right direction)