diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/BitmapIndexImpl.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/BitmapIndexImpl.java index 55c05ef78..8d8c6a045 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/BitmapIndexImpl.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/BitmapIndexImpl.java @@ -86,6 +86,11 @@ int findOrInsert(AnyObjectId objectId, int type) { return position; } + /** + * A bitset for representing small changes (set/remove individual bits) + * relative to an existing EWAH bitmap. Executing bit-vector operations will + * materialize the changes into a fresh EWAH bitmap + */ private static final class ComboBitset { private InflatingBitSet inflatingBitmap; @@ -121,18 +126,21 @@ EWAHCompressedBitmap combine() { return inflatingBitmap.getBitmap(); } + /* In-place or operation */ void or(EWAHCompressedBitmap inbits) { if (toRemove != null) combine(); inflatingBitmap = inflatingBitmap.or(inbits); } + /* In-place andNot operation */ void andNot(EWAHCompressedBitmap inbits) { if (toAdd != null || toRemove != null) combine(); inflatingBitmap = inflatingBitmap.andNot(inbits); } + /* In-place xor operation. */ void xor(EWAHCompressedBitmap inbits) { if (toAdd != null || toRemove != null) combine();