Package org.eclipse.jgit.revwalk
Class DepthWalk.RevWalk
- java.lang.Object
-
- org.eclipse.jgit.revwalk.RevWalk
-
- org.eclipse.jgit.revwalk.DepthWalk.RevWalk
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.eclipse.jgit.revwalk.DepthWalk
DepthWalk.Commit, DepthWalk.ObjectWalk, DepthWalk.RevWalk
-
-
Constructor Summary
Constructors Constructor Description RevWalk(ObjectReader or, int depth)
RevWalk(Repository repo, int depth)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected RevCommit
createCommit(AnyObjectId id)
Construct a new unparsed commit for the given object.int
getDepth()
RevFlag
getReinterestingFlag()
RevFlag
getUnshallowFlag()
void
markRoot(RevCommit c)
Mark a root commit (i.e., one whose depth should be considered 0.)-
Methods inherited from class org.eclipse.jgit.revwalk.RevWalk
assertNotStarted, assumeShallow, carry, carry, dispose, disposeFlag, getObjectReader, getRevFilter, getRevSort, getTreeFilter, hasRevSort, isMergedInto, isRetainBody, iterator, lookupAny, lookupBlob, lookupCommit, lookupOrNull, lookupTag, lookupTree, markStart, markStart, markUninteresting, newFlag, next, parseAny, parseAny, parseBody, parseCommit, parseHeaders, parseTag, parseTree, peel, release, reset, reset, resetRetain, resetRetain, retainOnReset, retainOnReset, setRetainBody, setRevFilter, setRewriteParents, setTreeFilter, sort, sort, toObjectWalkWithSameObjects
-
-
-
-
Constructor Detail
-
RevWalk
public RevWalk(Repository repo, int depth)
- Parameters:
repo
- Repository to walkdepth
- Maximum depth to return
-
RevWalk
public RevWalk(ObjectReader or, int depth)
- Parameters:
or
- ObjectReader to usedepth
- Maximum depth to return
-
-
Method Detail
-
markRoot
public void markRoot(RevCommit c) throws MissingObjectException, IncorrectObjectTypeException, java.io.IOException
Mark a root commit (i.e., one whose depth should be considered 0.)- Parameters:
c
- Commit to mark- Throws:
java.io.IOException
IncorrectObjectTypeException
MissingObjectException
-
createCommit
protected RevCommit createCommit(AnyObjectId id)
Description copied from class:RevWalk
Construct a new unparsed commit for the given object.- Overrides:
createCommit
in classRevWalk
- Parameters:
id
- the object this walker requires a commit reference for.- Returns:
- a new unparsed reference for the object.
-
getDepth
public int getDepth()
-
getUnshallowFlag
public RevFlag getUnshallowFlag()
- Specified by:
getUnshallowFlag
in interfaceDepthWalk
- Returns:
- flag marking commits that should become unshallow.
-
getReinterestingFlag
public RevFlag getReinterestingFlag()
- Specified by:
getReinterestingFlag
in interfaceDepthWalk
- Returns:
- flag marking commits that are interesting again.
-
-