Package org.eclipse.jgit.revwalk
Class DepthWalk.ObjectWalk
- java.lang.Object
-
- org.eclipse.jgit.revwalk.RevWalk
-
- org.eclipse.jgit.revwalk.ObjectWalk
-
- org.eclipse.jgit.revwalk.DepthWalk.ObjectWalk
-
-
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 ObjectWalk(ObjectReader or, int depth)ObjectWalk(Repository repo, int depth)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected RevCommitcreateCommit(AnyObjectId id)Construct a new unparsed commit for the given object.intgetDepth()RevFlaggetReinterestingFlag()RevFlaggetUnshallowFlag()voidmarkRoot(RevObject o)Mark a root commit (i.e., one whose depth should be considered 0.)voidmarkUnshallow(RevObject c)Mark an element which used to be shallow in the client, but which should now be considered a full commit.-
Methods inherited from class org.eclipse.jgit.revwalk.ObjectWalk
checkConnectivity, dispose, getPathBuffer, getPathHashCode, getPathLength, getPathString, markStart, markUninteresting, next, nextObject, reset, sort, sort
-
Methods inherited from class org.eclipse.jgit.revwalk.RevWalk
assertNotStarted, assumeShallow, carry, carry, disposeFlag, getObjectReader, getRevFilter, getRevSort, getTreeFilter, hasRevSort, isMergedInto, isRetainBody, iterator, lookupAny, lookupBlob, lookupCommit, lookupOrNull, lookupTag, lookupTree, markStart, markStart, markUninteresting, newFlag, parseAny, parseAny, parseBody, parseCommit, parseHeaders, parseTag, parseTree, peel, release, reset, resetRetain, resetRetain, retainOnReset, retainOnReset, setRetainBody, setRevFilter, setRewriteParents, setTreeFilter, toObjectWalkWithSameObjects
-
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 Detail
-
ObjectWalk
public ObjectWalk(Repository repo, int depth)
- Parameters:
repo- Repository to walkdepth- Maximum depth to return
-
ObjectWalk
public ObjectWalk(ObjectReader or, int depth)
- Parameters:
or- Object Readerdepth- Maximum depth to return
-
-
Method Detail
-
markRoot
public void markRoot(RevObject o) throws MissingObjectException, IncorrectObjectTypeException, IOException
Mark a root commit (i.e., one whose depth should be considered 0.)- Parameters:
o- Commit to mark- Throws:
IOExceptionIncorrectObjectTypeExceptionMissingObjectException
-
markUnshallow
public void markUnshallow(RevObject c) throws MissingObjectException, IncorrectObjectTypeException, IOException
Mark an element which used to be shallow in the client, but which should now be considered a full commit. Any ancestors of this commit should be included in the walk, even if they are the ancestor of an uninteresting commit.- Parameters:
c- Commit to mark- Throws:
MissingObjectExceptionIncorrectObjectTypeExceptionIOException
-
createCommit
protected RevCommit createCommit(AnyObjectId id)
Description copied from class:RevWalkConstruct a new unparsed commit for the given object.- Overrides:
createCommitin 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:
getUnshallowFlagin interfaceDepthWalk- Returns:
- flag marking commits that should become unshallow.
-
getReinterestingFlag
public RevFlag getReinterestingFlag()
- Specified by:
getReinterestingFlagin interfaceDepthWalk- Returns:
- flag marking commits that are interesting again.
-
-