private static class PackWriterBitmapPreparer.NotInBitmapFilter extends RevFilter
If a commit is in bitmap
then that commit is not emitted by the
walk and its parents are marked as SEEN so the walk can skip them. The
bitmaps passed in have the property that the parents of any commit in
bitmap
are also in bitmap
, so marking the parents as
SEEN speeds up the RevWalk by saving it from walking down blind alleys
and does not change the commits emitted.
Modifier and Type | Field and Description |
---|---|
private BitmapIndex.BitmapBuilder |
bitmap |
ALL, MERGE_BASE, NO_MERGES, NONE, ONLY_MERGES
Constructor and Description |
---|
NotInBitmapFilter(BitmapIndex.BitmapBuilder bitmap) |
Modifier and Type | Method and Description |
---|---|
PackWriterBitmapPreparer.NotInBitmapFilter |
clone() |
boolean |
include(RevWalk rw,
RevCommit c)
Determine if the supplied commit should be included in results.
|
boolean |
requiresCommitBody()
Whether the filter needs the commit body to be parsed.
|
private final BitmapIndex.BitmapBuilder bitmap
NotInBitmapFilter(BitmapIndex.BitmapBuilder bitmap)
public final boolean include(RevWalk rw, RevCommit c)
RevFilter
include
in class RevFilter
rw
- the active walker this filter is being invoked from within.c
- the commit currently being tested. The commit has been parsed
and its body is available for inspection only if the filter
returns true from RevFilter.requiresCommitBody()
.public final PackWriterBitmapPreparer.NotInBitmapFilter clone()
RevFilter
Clone this revision filter, including its parameters.
This is a deep clone. If this filter embeds objects or other filters it must also clone those, to ensure the instances do not share mutable data.
public final boolean requiresCommitBody()
RevFilter
requiresCommitBody
in class RevFilter