]> arthur.barton.de Git - bup.git/commit - lib/bup/_helpers.c
_helpers.c: midx4 didn't handle multiple index with the same object.
authorAvery Pennarun <apenwarr@gmail.com>
Fri, 18 Feb 2011 08:44:32 +0000 (00:44 -0800)
committerAvery Pennarun <apenwarr@gmail.com>
Fri, 18 Feb 2011 08:55:33 +0000 (00:55 -0800)
commita850b7fbed64c7e62cd76e9607967a29e3037c2d
tree0f71ec4f3b78117f45c752fb448969d37f315cdc
parentb734aa5cbedd79a73836538bb5e3a76a83941751
_helpers.c: midx4 didn't handle multiple index with the same object.

It *tried* to handle it, but would end up with a bunch of zero entries at
the end, which prevents .exists() from working correctly in some cases.

In midx2, it made sense to never include the same entry twice, because the
only informatin we had about a particular entry was that it existed.  In
midx4 this is no longer true; we might sometimes want to know *all* the idx
files that contain a particular object (for example, when we implement
expiry later).  So the easiest fix for this bug is to just include multiple
entries when we have them.

Signed-off-by: Avery Pennarun <apenwarr@gmail.com>
lib/bup/_helpers.c
lib/bup/bupsplit.c