Re: git behaviour question regarding SHA-1 and commits
- From
- Victor Engmark <victor.engmark@terreactive.ch>
- Date
- Nov 14, 2011, 12:48 UTC
- Message-ID
- <20111114124851.GB21854@victor>
- In-Reply-To
- <20111114113235.GE10847@sigill.intra.peff.net>
On Mon, Nov 14, 2011 at 06:32:35AM -0500, Jeff King wrote:
Show 12 quoted lines
> 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.
Would it be helpful to truncate this to something ludicrous like a single byte of entropy, to be able to write tests for the various tools and options?
Cheers, V
-- terreActive AG Kasinostrasse 30 CH-5001 Aarau Tel: +41 62 834 00 55 Fax: +41 62 823 93 56 www.terreactive.ch Wir sichern Ihren Erfolg - seit 15 Jahren