Top Description Inners Fields Constructors Methods
org.eclipse.jgit.revwalk.filter

public abstract Class RevFilter

extends Object
Class Inheritance
Known Direct Subclasses
org.eclipse.jgit.revwalk.filter.RevFilter.AllFilter, org.eclipse.jgit.revwalk.filter.RevFilter.NoneFilter, org.eclipse.jgit.revwalk.filter.RevFilter.OnlyMergesFilter, org.eclipse.jgit.revwalk.filter.RevFilter.NoMergesFilter, org.eclipse.jgit.revwalk.filter.RevFilter.MergeBaseFilter, org.eclipse.jgit.revwalk.filter.RevFlagFilter, org.eclipse.jgit.revwalk.filter.SkipRevFilter, org.eclipse.jgit.revwalk.filter.SubStringRevFilter, org.eclipse.jgit.internal.revwalk.AddToBitmapFilter, org.eclipse.jgit.internal.revwalk.AddToBitmapWithCacheFilter, org.eclipse.jgit.internal.revwalk.AddUnseenToBitmapFilter, org.eclipse.jgit.internal.revwalk.BitmappedReachabilityChecker.ReachedFilter, org.eclipse.jgit.internal.storage.pack.PackWriterBitmapPreparer.NotInBitmapFilter, org.eclipse.jgit.revwalk.TreeRevFilter, org.eclipse.jgit.revwalk.filter.AndRevFilter, org.eclipse.jgit.revwalk.filter.CommitTimeRevFilter, org.eclipse.jgit.revwalk.filter.MaxCountRevFilter, org.eclipse.jgit.revwalk.filter.NotRevFilter, org.eclipse.jgit.revwalk.filter.OrRevFilter, org.eclipse.jgit.revwalk.filter.PatternMatchRevFilter
Imports
java.io.IOException, org.eclipse.jgit.errors.IncorrectObjectTypeException, .MissingObjectException, .StopWalkException, org.eclipse.jgit.internal.JGitText, org.eclipse.jgit.revwalk.RevCommit, .RevWalk

Selects interesting revisions during walking.

This is an abstract interface. Applications may implement a subclass, or use one of the predefined implementations already available within this package. Filters may be chained together using AndRevFilter and OrRevFilter to create complex boolean expressions.

Applications should install the filter on a RevWalk by org.eclipse.jgit.revwalk.RevWalk#setRevFilter(RevFilter) prior to starting traversal.

Unless specifically noted otherwise a RevFilter implementation is not thread safe and may not be shared by different RevWalk instances at the same time. This restriction allows RevFilter implementations to cache state within their instances during include(RevWalk, RevCommit) if it is beneficial to their implementation. Deep clones created by clone() may be used to construct a thread-safe copy of an existing filter.

Message filters:

Merge filters:

Boolean modifiers:

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class
private static class
private static class
private static class
private static class

Field Summary

Modifier and TypeField and Description
public static final RevFilter
ALL

Default filter that always returns true (thread safe).

public static final RevFilter
MERGE_BASE

Selects only merge bases of the starting points (thread safe).

public static final RevFilter
NO_MERGES

Excludes commits with more than one parent (thread safe).

public static final RevFilter
NONE

Default filter that always returns false (thread safe).

public static final RevFilter
ONLY_MERGES

Filter including only merge commits, excluding all commits with less than two parents (thread safe).

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public abstract RevFilter
clone()

Overrides java.lang.Object.clone.

Creates and returns a copy of this object.

public abstract boolean

Returns:

true to include this commit in the results; false to have this commit be omitted entirely from the results.
include
(RevWalk
the active walker this filter is being invoked from within.
walker
,
RevCommit
the commit currently being tested. The commit has been parsed and its body is available for inspection only if the filter returns true from requiresCommitBody().
cmit
)

Determine if the supplied commit should be included in results.

public RevFilter

Returns:

a new filter that includes commits this filter rejects.
negate
()

Create a new filter that does the opposite of this filter.

public boolean

Returns:

true if the filter needs the commit body to be parsed.
requiresCommitBody
()

Whether the filter needs the commit body to be parsed.

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

Inherited from java.lang.Object:
equalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

ALLback to summary
public static final RevFilter ALL

Default filter that always returns true (thread safe).

MERGE_BASEback to summary
public static final RevFilter MERGE_BASE

Selects only merge bases of the starting points (thread safe).

This is a special case filter that cannot be combined with any other filter. Its include method always throws an exception as context information beyond the arguments is necessary to determine if the supplied commit is a merge base.

NO_MERGESback to summary
public static final RevFilter NO_MERGES

Excludes commits with more than one parent (thread safe).

NONEback to summary
public static final RevFilter NONE

Default filter that always returns false (thread safe).

ONLY_MERGESback to summary
public static final RevFilter ONLY_MERGES

Filter including only merge commits, excluding all commits with less than two parents (thread safe).

Since
4.4

Constructor Detail

RevFilterback to summary
public RevFilter()

Method Detail

cloneback to summary
public abstract RevFilter clone()

Overrides java.lang.Object.clone.

Doc from java.lang.Object.clone.

Creates and returns a copy of this object. The precise meaning of "copy" may depend on the class of the object. The general intent is that, for any object x, the expression:

x.clone() != x
will be true, and that the expression:
x.clone().getClass() == x.getClass()
will be true, but these are not absolute requirements. While it is typically the case that:
x.clone().equals(x)
will be true, this is not an absolute requirement.

By convention, the returned object should be obtained by calling super.clone. If a class and all of its superclasses (except Object) obey this convention, it will be the case that x.clone().getClass() == x.getClass().

By convention, the object returned by this method should be independent of this object (which is being cloned). To achieve this independence, it may be necessary to modify one or more fields of the object returned by super.clone before returning it. Typically, this means copying any mutable objects that comprise the internal "deep structure" of the object being cloned and replacing the references to these objects with references to the copies. If a class contains only primitive fields or references to immutable objects, then it is usually the case that no fields in the object returned by super.clone need to be modified.

Clone this revision filter, including its parameters.

This is a deep clone. If this filter embeds objects or other filters it must also clone those, to ensure the instances do not share mutable data.

Returns:RevFilter

a clone of this instance.

Annotations
@Override
includeback to summary
public abstract boolean include(RevWalk walker, RevCommit cmit) throws StopWalkException, MissingObjectException, IncorrectObjectTypeException, IOException

Determine if the supplied commit should be included in results.

Parameters
walker:RevWalk

the active walker this filter is being invoked from within.

cmit:RevCommit

the commit currently being tested. The commit has been parsed and its body is available for inspection only if the filter returns true from requiresCommitBody().

Returns:boolean

true to include this commit in the results; false to have this commit be omitted entirely from the results.

Exceptions
StopWalkException:
the filter knows for certain that no additional commits can ever match, and the current commit doesn't match either. The walk is halted and no more results are provided.
MissingObjectException:
an object the filter needs to consult to determine its answer does not exist in the Git repository the walker is operating on. Filtering this commit is impossible without the object.
IncorrectObjectTypeException:
an object the filter needed to consult was not of the expected object type. This usually indicates a corrupt repository, as an object link is referencing the wrong type.
IOException:
a loose object or pack file could not be read to obtain data necessary for the filter to make its decision.
negateback to summary
public RevFilter negate()

Create a new filter that does the opposite of this filter.

Returns:RevFilter

a new filter that includes commits this filter rejects.

requiresCommitBodyback to summary
public boolean requiresCommitBody()

Whether the filter needs the commit body to be parsed.

Returns:boolean

true if the filter needs the commit body to be parsed.

toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Returns:String

a string representation of the object

Annotations
@Override
org.eclipse.jgit.revwalk.filter back to summary

private final Class RevFilter.AllFilter

extends RevFilter
Class Inheritance

Field Summary

Inherited from org.eclipse.jgit.revwalk.filter.RevFilter:
ALLMERGE_BASENO_MERGESNONEONLY_MERGES

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public RevFilter
clone()

Implements abstract org.eclipse.jgit.revwalk.filter.RevFilter.clone.

Creates and returns a copy of this object.

public boolean
include(RevWalk
the active walker this filter is being invoked from within.
walker
,
RevCommit
the commit currently being tested. The commit has been parsed and its body is available for inspection only if the filter returns true from requiresCommitBody().
c
)

Implements abstract org.eclipse.jgit.revwalk.filter.RevFilter.include.

Determine if the supplied commit should be included in results.

public boolean
requiresCommitBody()

Overrides org.eclipse.jgit.revwalk.filter.RevFilter.requiresCommitBody.

Whether the filter needs the commit body to be parsed.

public String
toString()

Overrides org.eclipse.jgit.revwalk.filter.RevFilter.toString.

Returns a string representation of the object.

Inherited from org.eclipse.jgit.revwalk.filter.RevFilter:
negate

Constructor Detail

AllFilterback to summary
private AllFilter()

Method Detail

cloneback to summary
public RevFilter clone()

Implements abstract org.eclipse.jgit.revwalk.filter.RevFilter.clone.

Doc from org.eclipse.jgit.revwalk.filter.RevFilter.clone.

Creates and returns a copy of this object. The precise meaning of "copy" may depend on the class of the object. The general intent is that, for any object x, the expression:

x.clone() != x
will be true, and that the expression:
x.clone().getClass() == x.getClass()
will be true, but these are not absolute requirements. While it is typically the case that:
x.clone().equals(x)
will be true, this is not an absolute requirement.

By convention, the returned object should be obtained by calling super.clone. If a class and all of its superclasses (except Object) obey this convention, it will be the case that x.clone().getClass() == x.getClass().

By convention, the object returned by this method should be independent of this object (which is being cloned). To achieve this independence, it may be necessary to modify one or more fields of the object returned by super.clone before returning it. Typically, this means copying any mutable objects that comprise the internal "deep structure" of the object being cloned and replacing the references to these objects with references to the copies. If a class contains only primitive fields or references to immutable objects, then it is usually the case that no fields in the object returned by super.clone need to be modified.

Clone this revision filter, including its parameters.

This is a deep clone. If this filter embeds objects or other filters it must also clone those, to ensure the instances do not share mutable data.

Returns:RevFilter

Doc from java.lang.Object.clone.

a clone of this instance.

Annotations
@Override
includeback to summary
public boolean include(RevWalk walker, RevCommit c)

Implements abstract org.eclipse.jgit.revwalk.filter.RevFilter.include.

Doc from org.eclipse.jgit.revwalk.filter.RevFilter.include.

Determine if the supplied commit should be included in results.

Parameters
walker:RevWalk

the active walker this filter is being invoked from within.

c:RevCommit

the commit currently being tested. The commit has been parsed and its body is available for inspection only if the filter returns true from requiresCommitBody().

Returns:boolean

true to include this commit in the results; false to have this commit be omitted entirely from the results.

Annotations
@Override
requiresCommitBodyback to summary
public boolean requiresCommitBody()

Overrides org.eclipse.jgit.revwalk.filter.RevFilter.requiresCommitBody.

Doc from org.eclipse.jgit.revwalk.filter.RevFilter.requiresCommitBody.

Whether the filter needs the commit body to be parsed.

Returns:boolean

true if the filter needs the commit body to be parsed.

Annotations
@Override
toStringback to summary
public String toString()

Overrides org.eclipse.jgit.revwalk.filter.RevFilter.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Returns:String

a string representation of the object

Annotations
@Override
org.eclipse.jgit.revwalk.filter back to summary

private final Class RevFilter.MergeBaseFilter

extends RevFilter
Class Inheritance

Field Summary

Inherited from org.eclipse.jgit.revwalk.filter.RevFilter:
ALLMERGE_BASENO_MERGESNONEONLY_MERGES

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public RevFilter
clone()

Implements abstract org.eclipse.jgit.revwalk.filter.RevFilter.clone.

Creates and returns a copy of this object.

public boolean
include(RevWalk
the active walker this filter is being invoked from within.
walker
,
RevCommit
the commit currently being tested. The commit has been parsed and its body is available for inspection only if the filter returns true from requiresCommitBody().
c
)

Implements abstract org.eclipse.jgit.revwalk.filter.RevFilter.include.

Determine if the supplied commit should be included in results.

public boolean
requiresCommitBody()

Overrides org.eclipse.jgit.revwalk.filter.RevFilter.requiresCommitBody.

Whether the filter needs the commit body to be parsed.

public String
toString()

Overrides org.eclipse.jgit.revwalk.filter.RevFilter.toString.

Returns a string representation of the object.

Inherited from org.eclipse.jgit.revwalk.filter.RevFilter:
negate

Constructor Detail

MergeBaseFilterback to summary
private MergeBaseFilter()

Method Detail

cloneback to summary
public RevFilter clone()

Implements abstract org.eclipse.jgit.revwalk.filter.RevFilter.clone.

Doc from org.eclipse.jgit.revwalk.filter.RevFilter.clone.

Creates and returns a copy of this object. The precise meaning of "copy" may depend on the class of the object. The general intent is that, for any object x, the expression:

x.clone() != x
will be true, and that the expression:
x.clone().getClass() == x.getClass()
will be true, but these are not absolute requirements. While it is typically the case that:
x.clone().equals(x)
will be true, this is not an absolute requirement.

By convention, the returned object should be obtained by calling super.clone. If a class and all of its superclasses (except Object) obey this convention, it will be the case that x.clone().getClass() == x.getClass().

By convention, the object returned by this method should be independent of this object (which is being cloned). To achieve this independence, it may be necessary to modify one or more fields of the object returned by super.clone before returning it. Typically, this means copying any mutable objects that comprise the internal "deep structure" of the object being cloned and replacing the references to these objects with references to the copies. If a class contains only primitive fields or references to immutable objects, then it is usually the case that no fields in the object returned by super.clone need to be modified.

Clone this revision filter, including its parameters.

This is a deep clone. If this filter embeds objects or other filters it must also clone those, to ensure the instances do not share mutable data.

Returns:RevFilter

Doc from java.lang.Object.clone.

a clone of this instance.

Annotations
@Override
includeback to summary
public boolean include(RevWalk walker, RevCommit c)

Implements abstract org.eclipse.jgit.revwalk.filter.RevFilter.include.

Doc from org.eclipse.jgit.revwalk.filter.RevFilter.include.

Determine if the supplied commit should be included in results.

Parameters
walker:RevWalk

the active walker this filter is being invoked from within.

c:RevCommit

the commit currently being tested. The commit has been parsed and its body is available for inspection only if the filter returns true from requiresCommitBody().

Returns:boolean

true to include this commit in the results; false to have this commit be omitted entirely from the results.

Annotations
@Override
requiresCommitBodyback to summary
public boolean requiresCommitBody()

Overrides org.eclipse.jgit.revwalk.filter.RevFilter.requiresCommitBody.

Doc from org.eclipse.jgit.revwalk.filter.RevFilter.requiresCommitBody.

Whether the filter needs the commit body to be parsed.

Returns:boolean

true if the filter needs the commit body to be parsed.

Annotations
@Override
toStringback to summary
public String toString()

Overrides org.eclipse.jgit.revwalk.filter.RevFilter.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Returns:String

a string representation of the object

Annotations
@Override
org.eclipse.jgit.revwalk.filter back to summary

private final Class RevFilter.NoMergesFilter

extends RevFilter
Class Inheritance

Field Summary

Inherited from org.eclipse.jgit.revwalk.filter.RevFilter:
ALLMERGE_BASENO_MERGESNONEONLY_MERGES

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public RevFilter
clone()

Implements abstract org.eclipse.jgit.revwalk.filter.RevFilter.clone.

Creates and returns a copy of this object.

public boolean
include(RevWalk
the active walker this filter is being invoked from within.
walker
,
RevCommit
the commit currently being tested. The commit has been parsed and its body is available for inspection only if the filter returns true from requiresCommitBody().
c
)

Implements abstract org.eclipse.jgit.revwalk.filter.RevFilter.include.

Determine if the supplied commit should be included in results.

public boolean
requiresCommitBody()

Overrides org.eclipse.jgit.revwalk.filter.RevFilter.requiresCommitBody.

Whether the filter needs the commit body to be parsed.

public String
toString()

Overrides org.eclipse.jgit.revwalk.filter.RevFilter.toString.

Returns a string representation of the object.

Inherited from org.eclipse.jgit.revwalk.filter.RevFilter:
negate

Constructor Detail

NoMergesFilterback to summary
private NoMergesFilter()

Method Detail

cloneback to summary
public RevFilter clone()

Implements abstract org.eclipse.jgit.revwalk.filter.RevFilter.clone.

Doc from org.eclipse.jgit.revwalk.filter.RevFilter.clone.

Creates and returns a copy of this object. The precise meaning of "copy" may depend on the class of the object. The general intent is that, for any object x, the expression:

x.clone() != x
will be true, and that the expression:
x.clone().getClass() == x.getClass()
will be true, but these are not absolute requirements. While it is typically the case that:
x.clone().equals(x)
will be true, this is not an absolute requirement.

By convention, the returned object should be obtained by calling super.clone. If a class and all of its superclasses (except Object) obey this convention, it will be the case that x.clone().getClass() == x.getClass().

By convention, the object returned by this method should be independent of this object (which is being cloned). To achieve this independence, it may be necessary to modify one or more fields of the object returned by super.clone before returning it. Typically, this means copying any mutable objects that comprise the internal "deep structure" of the object being cloned and replacing the references to these objects with references to the copies. If a class contains only primitive fields or references to immutable objects, then it is usually the case that no fields in the object returned by super.clone need to be modified.

Clone this revision filter, including its parameters.

This is a deep clone. If this filter embeds objects or other filters it must also clone those, to ensure the instances do not share mutable data.

Returns:RevFilter

Doc from java.lang.Object.clone.

a clone of this instance.

Annotations
@Override
includeback to summary
public boolean include(RevWalk walker, RevCommit c)

Implements abstract org.eclipse.jgit.revwalk.filter.RevFilter.include.

Doc from org.eclipse.jgit.revwalk.filter.RevFilter.include.

Determine if the supplied commit should be included in results.

Parameters
walker:RevWalk

the active walker this filter is being invoked from within.

c:RevCommit

the commit currently being tested. The commit has been parsed and its body is available for inspection only if the filter returns true from requiresCommitBody().

Returns:boolean

true to include this commit in the results; false to have this commit be omitted entirely from the results.

Annotations
@Override
requiresCommitBodyback to summary
public boolean requiresCommitBody()

Overrides org.eclipse.jgit.revwalk.filter.RevFilter.requiresCommitBody.

Doc from org.eclipse.jgit.revwalk.filter.RevFilter.requiresCommitBody.

Whether the filter needs the commit body to be parsed.

Returns:boolean

true if the filter needs the commit body to be parsed.

Annotations
@Override
toStringback to summary
public String toString()

Overrides org.eclipse.jgit.revwalk.filter.RevFilter.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Returns:String

a string representation of the object

Annotations
@Override
org.eclipse.jgit.revwalk.filter back to summary

private final Class RevFilter.NoneFilter

extends RevFilter
Class Inheritance

Field Summary

Inherited from org.eclipse.jgit.revwalk.filter.RevFilter:
ALLMERGE_BASENO_MERGESNONEONLY_MERGES

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public RevFilter
clone()

Implements abstract org.eclipse.jgit.revwalk.filter.RevFilter.clone.

Creates and returns a copy of this object.

public boolean
include(RevWalk
the active walker this filter is being invoked from within.
walker
,
RevCommit
the commit currently being tested. The commit has been parsed and its body is available for inspection only if the filter returns true from requiresCommitBody().
c
)

Implements abstract org.eclipse.jgit.revwalk.filter.RevFilter.include.

Determine if the supplied commit should be included in results.

public boolean
requiresCommitBody()

Overrides org.eclipse.jgit.revwalk.filter.RevFilter.requiresCommitBody.

Whether the filter needs the commit body to be parsed.

public String
toString()

Overrides org.eclipse.jgit.revwalk.filter.RevFilter.toString.

Returns a string representation of the object.

Inherited from org.eclipse.jgit.revwalk.filter.RevFilter:
negate

Constructor Detail

NoneFilterback to summary
private NoneFilter()

Method Detail

cloneback to summary
public RevFilter clone()

Implements abstract org.eclipse.jgit.revwalk.filter.RevFilter.clone.

Doc from org.eclipse.jgit.revwalk.filter.RevFilter.clone.

Creates and returns a copy of this object. The precise meaning of "copy" may depend on the class of the object. The general intent is that, for any object x, the expression:

x.clone() != x
will be true, and that the expression:
x.clone().getClass() == x.getClass()
will be true, but these are not absolute requirements. While it is typically the case that:
x.clone().equals(x)
will be true, this is not an absolute requirement.

By convention, the returned object should be obtained by calling super.clone. If a class and all of its superclasses (except Object) obey this convention, it will be the case that x.clone().getClass() == x.getClass().

By convention, the object returned by this method should be independent of this object (which is being cloned). To achieve this independence, it may be necessary to modify one or more fields of the object returned by super.clone before returning it. Typically, this means copying any mutable objects that comprise the internal "deep structure" of the object being cloned and replacing the references to these objects with references to the copies. If a class contains only primitive fields or references to immutable objects, then it is usually the case that no fields in the object returned by super.clone need to be modified.

Clone this revision filter, including its parameters.

This is a deep clone. If this filter embeds objects or other filters it must also clone those, to ensure the instances do not share mutable data.

Returns:RevFilter

Doc from java.lang.Object.clone.

a clone of this instance.

Annotations
@Override
includeback to summary
public boolean include(RevWalk walker, RevCommit c)

Implements abstract org.eclipse.jgit.revwalk.filter.RevFilter.include.

Doc from org.eclipse.jgit.revwalk.filter.RevFilter.include.

Determine if the supplied commit should be included in results.

Parameters
walker:RevWalk

the active walker this filter is being invoked from within.

c:RevCommit

the commit currently being tested. The commit has been parsed and its body is available for inspection only if the filter returns true from requiresCommitBody().

Returns:boolean

true to include this commit in the results; false to have this commit be omitted entirely from the results.

Annotations
@Override
requiresCommitBodyback to summary
public boolean requiresCommitBody()

Overrides org.eclipse.jgit.revwalk.filter.RevFilter.requiresCommitBody.

Doc from org.eclipse.jgit.revwalk.filter.RevFilter.requiresCommitBody.

Whether the filter needs the commit body to be parsed.

Returns:boolean

true if the filter needs the commit body to be parsed.

Annotations
@Override
toStringback to summary
public String toString()

Overrides org.eclipse.jgit.revwalk.filter.RevFilter.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Returns:String

a string representation of the object

Annotations
@Override
org.eclipse.jgit.revwalk.filter back to summary

private final Class RevFilter.OnlyMergesFilter

extends RevFilter
Class Inheritance

Field Summary

Inherited from org.eclipse.jgit.revwalk.filter.RevFilter:
ALLMERGE_BASENO_MERGESNONEONLY_MERGES

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public RevFilter
clone()

Implements abstract org.eclipse.jgit.revwalk.filter.RevFilter.clone.

Creates and returns a copy of this object.

public boolean
include(RevWalk
the active walker this filter is being invoked from within.
walker
,
RevCommit
the commit currently being tested. The commit has been parsed and its body is available for inspection only if the filter returns true from requiresCommitBody().
c
)

Implements abstract org.eclipse.jgit.revwalk.filter.RevFilter.include.

Determine if the supplied commit should be included in results.

public boolean
requiresCommitBody()

Overrides org.eclipse.jgit.revwalk.filter.RevFilter.requiresCommitBody.

Whether the filter needs the commit body to be parsed.

public String
toString()

Overrides org.eclipse.jgit.revwalk.filter.RevFilter.toString.

Returns a string representation of the object.

Inherited from org.eclipse.jgit.revwalk.filter.RevFilter:
negate

Constructor Detail

OnlyMergesFilterback to summary
private OnlyMergesFilter()

Method Detail

cloneback to summary
public RevFilter clone()

Implements abstract org.eclipse.jgit.revwalk.filter.RevFilter.clone.

Doc from org.eclipse.jgit.revwalk.filter.RevFilter.clone.

Creates and returns a copy of this object. The precise meaning of "copy" may depend on the class of the object. The general intent is that, for any object x, the expression:

x.clone() != x
will be true, and that the expression:
x.clone().getClass() == x.getClass()
will be true, but these are not absolute requirements. While it is typically the case that:
x.clone().equals(x)
will be true, this is not an absolute requirement.

By convention, the returned object should be obtained by calling super.clone. If a class and all of its superclasses (except Object) obey this convention, it will be the case that x.clone().getClass() == x.getClass().

By convention, the object returned by this method should be independent of this object (which is being cloned). To achieve this independence, it may be necessary to modify one or more fields of the object returned by super.clone before returning it. Typically, this means copying any mutable objects that comprise the internal "deep structure" of the object being cloned and replacing the references to these objects with references to the copies. If a class contains only primitive fields or references to immutable objects, then it is usually the case that no fields in the object returned by super.clone need to be modified.

Clone this revision filter, including its parameters.

This is a deep clone. If this filter embeds objects or other filters it must also clone those, to ensure the instances do not share mutable data.

Returns:RevFilter

Doc from java.lang.Object.clone.

a clone of this instance.

Annotations
@Override
includeback to summary
public boolean include(RevWalk walker, RevCommit c)

Implements abstract org.eclipse.jgit.revwalk.filter.RevFilter.include.

Doc from org.eclipse.jgit.revwalk.filter.RevFilter.include.

Determine if the supplied commit should be included in results.

Parameters
walker:RevWalk

the active walker this filter is being invoked from within.

c:RevCommit

the commit currently being tested. The commit has been parsed and its body is available for inspection only if the filter returns true from requiresCommitBody().

Returns:boolean

true to include this commit in the results; false to have this commit be omitted entirely from the results.

Annotations
@Override
requiresCommitBodyback to summary
public boolean requiresCommitBody()

Overrides org.eclipse.jgit.revwalk.filter.RevFilter.requiresCommitBody.

Doc from org.eclipse.jgit.revwalk.filter.RevFilter.requiresCommitBody.

Whether the filter needs the commit body to be parsed.

Returns:boolean

true if the filter needs the commit body to be parsed.

Annotations
@Override
toStringback to summary
public String toString()

Overrides org.eclipse.jgit.revwalk.filter.RevFilter.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Returns:String

a string representation of the object

Annotations
@Override