DepthWalk.Commit, DepthWalk.ObjectWalk, DepthWalk.RevWalk
Constructor and Description |
---|
RevWalk(ObjectReader or,
int depth) |
RevWalk(Repository repo,
int depth) |
Modifier and Type | Method and 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.)
|
DepthWalk.ObjectWalk |
toObjectWalkWithSameObjects()
Create and return an
ObjectWalk using the same objects. |
assertNotStarted, assumeShallow, carry, carry, close, 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, reset, reset, resetRetain, resetRetain, retainOnReset, retainOnReset, setRetainBody, setRevFilter, setRewriteParents, setTreeFilter, sort, sort
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEach, spliterator
public RevWalk(Repository repo, int depth)
repo
- Repository to walkdepth
- Maximum depth to returnpublic RevWalk(ObjectReader or, int depth)
or
- ObjectReader to usedepth
- Maximum depth to returnpublic void markRoot(RevCommit c) throws MissingObjectException, IncorrectObjectTypeException, IOException
c
- Commit to markIOException
IncorrectObjectTypeException
MissingObjectException
protected RevCommit createCommit(AnyObjectId id)
RevWalk
createCommit
in class RevWalk
id
- the object this walker requires a commit reference for.public int getDepth()
public RevFlag getUnshallowFlag()
getUnshallowFlag
in interface DepthWalk
public RevFlag getReinterestingFlag()
getReinterestingFlag
in interface DepthWalk
public DepthWalk.ObjectWalk toObjectWalkWithSameObjects()
RevWalk
ObjectWalk
using the same objects.
Prior to using this method, the caller must reset this RevWalk to clean any flags that were used during the last traversal.
The returned ObjectWalk uses the same ObjectReader, internal object pool, and free RevFlags. Once the ObjectWalk is created, this RevWalk should not be used anymore.
toObjectWalkWithSameObjects
in class RevWalk
Copyright © 2017 Eclipse JGit Project. All rights reserved.