org.eclipse.jgit.revwalk

## Class DepthWalk.RevWalk

- java.lang.Object
- - org.eclipse.jgit.revwalk.RevWalk
  - - org.eclipse.jgit.revwalk.DepthWalk.RevWalk

All Implemented Interfaces:
  Iterable<RevCommit>, DepthWalk

Enclosing interface:
  DepthWalk

    public static class DepthWalk.RevWalk
    extends RevWalk
    implements 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

Constructors
Constructor and Description
`RevWalk(ObjectReader or, int depth)`
`RevWalk(Repository repo, int depth)`

### Method Summary

All Methods Instance Methods Concrete Methods
`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`

### 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

#### RevWalk

    public RevWalk(Repository repo,
                   int depth)

Parameters:
  `repo` - Repository to walk
  `depth` - Maximum depth to return

#### RevWalk

    public RevWalk(ObjectReader or,
                   int depth)

Parameters:
  `or` - ObjectReader to use
  `depth` - Maximum depth to return

### Method Detail

#### 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`
  `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 class `RevWalk`
Parameters:
  `id` - the object this walker requires a commit reference for.
Returns:
  a new unparsed reference for the object.

#### getDepth

    public int getDepth()

Specified by:
  `getDepth` in interface `DepthWalk`
Returns:
  Depth to filter to.

#### getUnshallowFlag

    public RevFlag getUnshallowFlag()

Specified by:
  `getUnshallowFlag` in interface `DepthWalk`
Returns:
  flag marking commits that should become unshallow.

#### getReinterestingFlag

    public RevFlag getReinterestingFlag()

Specified by:
  `getReinterestingFlag` in interface `DepthWalk`
Returns:
  flag marking commits that are interesting again.