From: Jeff King Date: Mon, 14 Nov 2011 11:32:35 GMT Subject: Re: git behaviour question regarding SHA-1 and commits Message-ID: <20111114113235.GE10847@sigill.intra.peff.net> In-Reply-To: <20111113182757.GA15194@elie.hsd1.il.comcast.net> On Sun, Nov 13, 2011 at 12:27:57PM -0600, Jonathan Nieder wrote: > Though I haven't tested. It would be nice to have an md5git (or even > truncated-sha1-git) program to test this kind of thing with. Fortunately we have such a thing: http://article.gmane.org/gmane.comp.version-control.git/184243 That one actually has 40 bits of hash entropy, so you'd expect to generate 2^20 (about a million) commits before accidentally colliding. If you want an easier experiment, you could truncate it even further. -Peff