diff options
author | Jonathan Nieder <jrn@google.com> | 2015-11-03 22:43:45 -0800 |
---|---|---|
committer | Jonathan Nieder <jrn@google.com> | 2015-11-05 14:51:47 -0800 |
commit | af4ee734546b874e21eab850cd00b7a3b726fa1d (patch) | |
tree | dc0549ee90277994b81da7f87c697ea9d258dec4 /org.eclipse.jgit | |
parent | 4009713946a79c933fd03593c80b65f29a5c9b6e (diff) | |
download | jgit-af4ee734546b874e21eab850cd00b7a3b726fa1d.tar.gz jgit-af4ee734546b874e21eab850cd00b7a3b726fa1d.zip |
Convert remaining callers of BitmapBuilder.add to use .addObject
When setupTipCommitBitmaps is called, writeBitmaps does not have any
bitmaps saved, so these calls to .add always add a single commit and
do not OR in a bitmap.
The objects returned by nextObject after a commit walk is finished
are trees and blobs. Non-commit objects do not have bitmaps
associated so the call to .add also can only add a single object.
Change-Id: I7b816145251a7fa4f1fffe0d03644257ea7f5440
Diffstat (limited to 'org.eclipse.jgit')
-rw-r--r-- | org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/PackWriterBitmapPreparer.java | 4 | ||||
-rw-r--r-- | org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/PackWriterBitmapWalker.java | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/PackWriterBitmapPreparer.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/PackWriterBitmapPreparer.java index 50693d3392..509ee61115 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/PackWriterBitmapPreparer.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/PackWriterBitmapPreparer.java @@ -410,7 +410,7 @@ class PackWriterBitmapPreparer { BitmapBuilder bitmap = commitBitmapIndex.newBitmapBuilder(); bitmap.or(reuse); - bitmap.add(rc, Constants.OBJ_COMMIT); + bitmap.addObject(rc, Constants.OBJ_COMMIT); tipCommitBitmaps.add(new BitmapBuilderEntry(rc, bitmap)); } @@ -429,7 +429,7 @@ class PackWriterBitmapPreparer { continue; } for (RevCommit c : rc.getParents()) { - bitmap.add(c, Constants.OBJ_COMMIT); + bitmap.addObject(c, Constants.OBJ_COMMIT); } } pm.update(1); diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/PackWriterBitmapWalker.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/PackWriterBitmapWalker.java index 01aa932557..262e5c4a18 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/PackWriterBitmapWalker.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/PackWriterBitmapWalker.java @@ -129,7 +129,7 @@ final class PackWriterBitmapWalker { RevObject ro; while ((ro = walker.nextObject()) != null) { - bitmapResult.add(ro, ro.getType()); + bitmapResult.addObject(ro, ro.getType()); pm.update(1); } } |