]> arthur.barton.de Git - bup.git/commit
cmd-margin: a command to find out the max bits of overlap between hashes.
authorAvery Pennarun <apenwarr@gmail.com>
Tue, 2 Feb 2010 01:40:30 +0000 (20:40 -0500)
committerAvery Pennarun <apenwarr@gmail.com>
Tue, 2 Feb 2010 01:44:11 +0000 (20:44 -0500)
commitd9967d8c4d532bb41c07358acb650f25132bf067
tree47010e825f7b31dd204bafdfd52d109f021cc810
parent5f0b1cf36d8001eabaf920aa55da4b5eb1d22f26
cmd-margin: a command to find out the max bits of overlap between hashes.

Run 'bup margin' to go through the list of all the objects in your bup
directory and count the number of overlapping prefix bits between each two
consecutive objects.  That is, fine the longest hash length (in bits) that
*would* have caused an overlap, if sha1 hashes had been that length.

On my system with 111 gigs of packs, I get 44 bits.  Out of a total of 160.
That means I'm still safe from collisions for about 2^116 times over.  Or is
it only the square root of that?  Anyway, it's such a large number that my
brain explodes just thinking about it.

Mark my words: 2^160 ought to be enough for anyone.
Makefile
_hashsplit.c
cmd-margin.py [new file with mode: 0755]
cmd-midx.py
git.py
helpers.py