public class CommitDiffFilter extends CommitFilter
include(RevWalk, RevCommit, Collection).| Modifier and Type | Field and Description |
|---|---|
protected boolean |
detectRenames
True to detect renames, false otherwise
|
protected org.eclipse.jgit.diff.RenameDetector |
renameDetector
Rename detector
|
repository| Constructor and Description |
|---|
CommitDiffFilter()
Create commit diff filter
|
CommitDiffFilter(boolean detectRenames)
Create commit diff filter
|
| Modifier and Type | Method and Description |
|---|---|
protected org.eclipse.jgit.treewalk.TreeWalk |
createTreeWalk(org.eclipse.jgit.revwalk.RevWalk walker,
org.eclipse.jgit.revwalk.RevCommit commit)
Create tree walk to compute differences for the given commits
|
boolean |
include(org.eclipse.jgit.revwalk.RevCommit commit,
Collection<org.eclipse.jgit.diff.DiffEntry> diffs)
Handle the differences introduced by given commit.
|
boolean |
include(org.eclipse.jgit.revwalk.RevWalk walker,
org.eclipse.jgit.revwalk.RevCommit commit) |
boolean |
include(org.eclipse.jgit.revwalk.RevWalk walker,
org.eclipse.jgit.revwalk.RevCommit commit,
Collection<org.eclipse.jgit.diff.DiffEntry> diffs)
Handle the differences introduced by given commit.
|
protected boolean |
isFileDiff(org.eclipse.jgit.diff.DiffEntry diff)
Is the given diff entry a file?
|
CommitFilter |
setRepository(org.eclipse.jgit.lib.Repository repository)
Set the repository for the walk that is about to begin.
|
clone, include, reset, setStop, throwIOExceptionprotected final boolean detectRenames
protected org.eclipse.jgit.diff.RenameDetector renameDetector
public CommitDiffFilter()
public CommitDiffFilter(boolean detectRenames)
detectRenames - true to detect renames, false otherwisepublic CommitFilter setRepository(org.eclipse.jgit.lib.Repository repository)
CommitFiltersetRepository in class CommitFilterprotected org.eclipse.jgit.treewalk.TreeWalk createTreeWalk(org.eclipse.jgit.revwalk.RevWalk walker,
org.eclipse.jgit.revwalk.RevCommit commit)
Sub-classes may override this method to create a custom tree walk with different filtering options set.
The last tree in the tree walk is assumed to be the tree of the current commit
walker - commit - public boolean include(org.eclipse.jgit.revwalk.RevWalk walker,
org.eclipse.jgit.revwalk.RevCommit commit)
throws IOException
include in class org.eclipse.jgit.revwalk.filter.RevFilterIOExceptionprotected boolean isFileDiff(org.eclipse.jgit.diff.DiffEntry diff)
diff - public boolean include(org.eclipse.jgit.revwalk.RevWalk walker,
org.eclipse.jgit.revwalk.RevCommit commit,
Collection<org.eclipse.jgit.diff.DiffEntry> diffs)
throws IOException
Sub-classes should override this method. The default implementation calls
include(RevCommit, Collection).
walker - non-nullcommit - non-nulldiffs - non-nullIOExceptionpublic boolean include(org.eclipse.jgit.revwalk.RevCommit commit,
Collection<org.eclipse.jgit.diff.DiffEntry> diffs)
throws IOException
Sub-classes should override this method. The default implementation returns true in all cases.
commit - non-nulldiffs - non-nullIOExceptionCopyright © 2011-2016. All Rights Reserved.