java.lang.Object
org.eclipse.jgit.revwalk.RevWalk
org.eclipse.jgit.revwalk.DepthWalk.RevWalk
- All Implemented Interfaces:
AutoCloseable
,Iterable<RevCommit>
,DepthWalk
- Enclosing interface:
- DepthWalk
Subclass of RevWalk that performs depth filtering.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.eclipse.jgit.revwalk.DepthWalk
DepthWalk.Commit, DepthWalk.ObjectWalk, DepthWalk.RevWalk
-
Constructor Summary
ConstructorsConstructorDescriptionRevWalk
(ObjectReader or, int depth) Create RevWalkRevWalk
(Repository repo, int depth) Create RevWalk -
Method Summary
Modifier and TypeMethodDescriptionprotected RevCommit
Construct a new unparsed commit for the given object.Get deepen-not flagGet deepen-not valuesint
Get deepen-since valueint
getDepth()
Get depth to filter to.Get flag marking commits that are interesting again.Get flag marking commits that should become unshallow.void
Mark a root commit (i.e., one whose depth should be considered 0.)void
setDeepenNots
(List<ObjectId> deepenNots) Mark objects that the client specified using --shallow-exclude.void
setDeepenSince
(int limit) Sets the deepen-since value.Convert to ObjectWalk with same objectsMethods inherited from class org.eclipse.jgit.revwalk.RevWalk
assertNoCommitsMarkedStart, assertNotStarted, assumeShallow, carry, carry, close, createReachabilityChecker, dispose, disposeFlag, getMergedInto, getMergedInto, getObjectReader, getRevFilter, getRevSort, getTreeFilter, hasRevSort, isFirstParent, isMergedInto, isMergedIntoAll, isMergedIntoAny, isRetainBody, iterator, lookupAny, lookupBlob, lookupCommit, lookupCommit, lookupOrNull, lookupTag, lookupTree, markStart, markStart, markUninteresting, newFlag, next, parseAny, parseAny, parseBody, parseCommit, parseHeaders, parseTag, parseTree, peel, reset, reset, resetRetain, resetRetain, retainOnReset, retainOnReset, setFirstParent, setRetainBody, setRevFilter, setRewriteParents, setTreeFilter, sort, sort
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
RevWalk
Create RevWalk- Parameters:
repo
- Repository to walkdepth
- Maximum depth to return
-
RevWalk
Create RevWalk- Parameters:
or
- ObjectReader to usedepth
- Maximum depth to return
-
-
Method Details
-
markRoot
public void markRoot(RevCommit c) throws MissingObjectException, IncorrectObjectTypeException, IOException Mark a root commit (i.e., one whose depth should be considered 0.)- Parameters:
c
- Commit to mark- Throws:
IOException
- if an IO error occurredIncorrectObjectTypeException
- if object has an unexpected typeMissingObjectException
- if object is missing
-
createCommit
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()Description copied from interface:DepthWalk
Get depth to filter to. -
getDeepenSince
public int getDeepenSince()Description copied from interface:DepthWalk
Get deepen-since value- Specified by:
getDeepenSince
in interfaceDepthWalk
- Returns:
- the deepen-since value; if not 0, this walk only returns commits whose commit time is at or after this limit
-
setDeepenSince
public void setDeepenSince(int limit) Sets the deepen-since value.- Parameters:
limit
- new deepen-since value- Since:
- 5.2
-
getDeepenNots
Description copied from interface:DepthWalk
Get deepen-not values- Specified by:
getDeepenNots
in interfaceDepthWalk
- Returns:
- the objects specified by the client using --shallow-exclude
-
setDeepenNots
Mark objects that the client specified using --shallow-exclude. Objects that are not commits have no effect.- Parameters:
deepenNots
- specified objects- Since:
- 5.2
-
getUnshallowFlag
Description copied from interface:DepthWalk
Get flag marking commits that should become unshallow.- Specified by:
getUnshallowFlag
in interfaceDepthWalk
- Returns:
- flag marking commits that should become unshallow.
-
getReinterestingFlag
Description copied from interface:DepthWalk
Get flag marking commits that are interesting again.- Specified by:
getReinterestingFlag
in interfaceDepthWalk
- Returns:
- flag marking commits that are interesting again.
-
getDeepenNotFlag
Description copied from interface:DepthWalk
Get deepen-not flag- Specified by:
getDeepenNotFlag
in interfaceDepthWalk
- Returns:
- flag marking commits that are to be excluded because of --shallow-exclude
-
toObjectWalkWithSameObjects
Convert to ObjectWalk with same objects- Overrides:
toObjectWalkWithSameObjects
in classRevWalk
- Returns:
- a new walk, using the exact same object pool.
- Since:
- 4.5
-