class MergeBaseGenerator extends Generator
This generator is selected if the RevFilter is only
RevFilter.MERGE_BASE
.
To compute the merge base we assign a temporary flag to each of the starting commits. The maximum number of starting commits is bounded by the number of free flags available in the RevWalk when the generator is initialized. These flags will be automatically released on the next reset of the RevWalk, but not until then, as they are assigned to commits throughout the history.
Several internal flags are reused here for a different purpose, but this should not have any impact as this generator should be run alone, and without any other generators wrapped around it.
Modifier and Type | Class and Description |
---|---|
private static class |
MergeBaseGenerator.CarryStack |
Modifier and Type | Field and Description |
---|---|
private int |
branchMask |
private static int |
CONTINUE |
private static int |
CONTINUE_ON_STACK |
private static int |
HAVE_ALL |
private static int |
IN_PENDING |
private static int |
MERGE_BASE |
private int |
mergeBaseAncestor |
private static int |
PARSED |
private DateRevQueue |
pending |
private static int |
POPPED |
private int |
recarryMask |
private int |
recarryTest |
private java.util.LinkedList<RevCommit> |
ret |
private MergeBaseGenerator.CarryStack |
stack |
private RevWalk |
walker |
firstParent, HAS_REWRITE, HAS_UNINTERESTING, NEEDS_REWRITE, SORT_COMMIT_TIME_DESC, SORT_TOPO
Constructor and Description |
---|
MergeBaseGenerator(RevWalk w) |
Modifier and Type | Method and Description |
---|---|
private RevCommit |
_next() |
private void |
add(RevCommit c) |
private void |
carryOntoHistory(RevCommit c,
int carry) |
private void |
carryOntoHistoryInnerLoop(RevCommit c,
int carry) |
private int |
carryOntoOne(RevCommit p,
int carry) |
(package private) void |
init(AbstractRevQueue p) |
(package private) RevCommit |
next()
Return the next commit to the application, or the next generator.
|
(package private) int |
outputType()
Obtain flags describing the output behavior of this generator.
|
shareFreeList
private static final int PARSED
private static final int IN_PENDING
private static final int POPPED
private static final int MERGE_BASE
private final RevWalk walker
private final DateRevQueue pending
private int branchMask
private int recarryTest
private int recarryMask
private int mergeBaseAncestor
private java.util.LinkedList<RevCommit> ret
private MergeBaseGenerator.CarryStack stack
private static final int CONTINUE
private static final int HAVE_ALL
private static final int CONTINUE_ON_STACK
MergeBaseGenerator(RevWalk w)
void init(AbstractRevQueue p) throws java.io.IOException
java.io.IOException
private void add(RevCommit c)
int outputType()
Generator
outputType
in class Generator
private RevCommit _next() throws MissingObjectException, IncorrectObjectTypeException, java.io.IOException
MissingObjectException
IncorrectObjectTypeException
java.io.IOException
RevCommit next() throws MissingObjectException, IncorrectObjectTypeException, java.io.IOException
Generator
next
in class Generator
MissingObjectException
IncorrectObjectTypeException
java.io.IOException
private void carryOntoHistory(RevCommit c, int carry)
private void carryOntoHistoryInnerLoop(RevCommit c, int carry)
private int carryOntoOne(RevCommit p, int carry)