diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackBitmapIndexBuilder.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackBitmapIndexBuilder.java index 05cd10095..62206c69c 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackBitmapIndexBuilder.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackBitmapIndexBuilder.java @@ -115,6 +115,10 @@ public class PackBitmapIndexBuilder extends BasePackBitmapIndex { JGitText.get().badObjectType, String.valueOf(type))); } } + commits.trim(); + trees.trim(); + blobs.trim(); + tags.trim(); } private ObjectToPack[] sortByOffset(List entries) { @@ -168,6 +172,7 @@ public class PackBitmapIndexBuilder extends BasePackBitmapIndex { */ public void addBitmap( AnyObjectId objectId, EWAHCompressedBitmap bitmap, int flags) { + bitmap.trim(); StoredBitmap result = new StoredBitmap(objectId, bitmap, null, flags); getBitmaps().add(result); byAddOrder.add(result);