]> source.dussan.org Git - jgit.git/commit
BitmapCalculator: Get the reachability bitmap of a commit 33/141733/4
authorIvan Frade <ifrade@google.com>
Tue, 7 May 2019 03:39:18 +0000 (20:39 -0700)
committerIvan Frade <ifrade@google.com>
Wed, 15 May 2019 22:04:00 +0000 (15:04 -0700)
commitb6da4b34cccc39a253d34e159a13cc2fd79a46bf
treeeb59e12b8cdc7541df141f3194a7f807c16cfa19
parent4e196faa1bbe8b4c061662d70479d2b189b4082f
BitmapCalculator: Get the reachability bitmap of a commit

To make reachability checks with bitmaps, we need to get the
reachability bitmap of a commit, which is not always precalculated.

There is already a class returning such bitmap (BitmapWalker) but it
does too much unnecessary work: it calculates ALL reachable objects from
a commit (i.e. including trees and blobs), when for reachability the
commits are just enough.

Introduce BitmapCalculator to get the bitmap of a commit: either because
it is precalculated or generating it with a walk only over commits.

Change-Id: Ibb6c78affe9eeaf1fa362a06daf4fd2d91c1caea
Signed-off-by: Ivan Frade <ifrade@google.com>
org.eclipse.jgit.test/tst/org/eclipse/jgit/revwalk/BitmapCalculatorTest.java [new file with mode: 0644]
org.eclipse.jgit/src/org/eclipse/jgit/revwalk/BitmapCalculator.java [new file with mode: 0644]