Re: git behaviour question regarding SHA-1 and commits
- From
Jeff King <peff@peff.net>
- Date
- Nov 14, 2011, 11:32 UTC
- 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