Package org.eclipse.jgit.revwalk
Class PendingGenerator
java.lang.Object
org.eclipse.jgit.revwalk.Generator
org.eclipse.jgit.revwalk.PendingGenerator
Default (and first pass) RevCommit Generator implementation for RevWalk.
This generator starts from a set of one or more commits and process them in
descending (newest to oldest) commit time order. Commits automatically cause
their parents to be enqueued for further processing, allowing the entire
commit graph to be walked. A RevFilter
may be used to select a subset
of the commits and return them to the caller.
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) boolean
private final RevFilter
private static final RevCommit
A commit near the end of time, to initializelast
with.private RevCommit
Last commit produced to the caller fromnext()
.private final int
(package private) static final int
Number of additional commits to scan after we think we are done.private int
Number of commits we have remaining in our over-scan allotment.private static final int
private final DateRevQueue
private static final int
private static final int
private final RevWalk
Fields inherited from class org.eclipse.jgit.revwalk.Generator
firstParent, HAS_REWRITE, HAS_UNINTERESTING, NEEDS_REWRITE, SORT_COMMIT_TIME_DESC, SORT_TOPO
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class org.eclipse.jgit.revwalk.Generator
shareFreeList
-
Field Details
-
PARSED
private static final int PARSED- See Also:
-
SEEN
private static final int SEEN- See Also:
-
UNINTERESTING
private static final int UNINTERESTING- See Also:
-
OVER_SCAN
static final int OVER_SCANNumber of additional commits to scan after we think we are done.This small buffer of commits is scanned to ensure we didn't miss anything as a result of clock skew when the commits were made. We need to set our constant to 1 additional commit due to the use of a pre-increment operator when accessing the value.
- See Also:
-
INIT_LAST
A commit near the end of time, to initializelast
with. -
walker
-
pending
-
filter
-
output
private final int output -
last
Last commit produced to the caller fromnext()
. -
overScan
private int overScanNumber of commits we have remaining in our over-scan allotment.Only relevant if there are
UNINTERESTING
commits in thepending
queue. -
canDispose
boolean canDispose
-
-
Constructor Details
-
PendingGenerator
PendingGenerator(RevWalk w, DateRevQueue p, RevFilter f, int out)
-
-
Method Details
-
outputType
int outputType()Description copied from class:Generator
Obtain flags describing the output behavior of this generator.- Specified by:
outputType
in classGenerator
- Returns:
- one or more of the constants declared in this class, describing how this generator produces its results.
-
next
Description copied from class:Generator
Return the next commit to the application, or the next generator.- Specified by:
next
in classGenerator
- Returns:
- next available commit; null if no more are to be returned.
- Throws:
MissingObjectException
IncorrectObjectTypeException
IOException
-