public class LastCommitDiffFilter extends CommitDiffFilter
Using this filter starting at the HEAD commit will give you the commit that last modified each file current in the HEAD tree.
detectRenames, renameDetectorrepository| Constructor and Description |
|---|
LastCommitDiffFilter()
Create filter
|
LastCommitDiffFilter(boolean detectRenames)
Create filter
|
| Modifier and Type | Method and Description |
|---|---|
org.eclipse.jgit.revwalk.filter.RevFilter |
clone()
Clones this filter.
|
Map<String,org.eclipse.jgit.revwalk.RevCommit> |
getCommits()
Get all paths in the tree returned from
getTree() mapped to the
last commit that modified the path |
org.eclipse.jgit.revwalk.RevTree |
getTree()
Get tree being indexed
|
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.
|
CommitFilter |
reset()
Resets the filter state.
|
createTreeWalk, include, include, isFileDiff, setRepositoryinclude, setStop, throwIOExceptionpublic LastCommitDiffFilter()
public LastCommitDiffFilter(boolean detectRenames)
detectRenames - public boolean include(org.eclipse.jgit.revwalk.RevWalk walker,
org.eclipse.jgit.revwalk.RevCommit commit,
Collection<org.eclipse.jgit.diff.DiffEntry> diffs)
throws IOException
CommitDiffFilter
Sub-classes should override this method. The default implementation calls
CommitDiffFilter.include(RevCommit, Collection).
include in class CommitDiffFilterwalker - non-nullcommit - non-nulldiffs - non-nullIOExceptionpublic org.eclipse.jgit.revwalk.RevTree getTree()
public Map<String,org.eclipse.jgit.revwalk.RevCommit> getCommits()
getTree() mapped to the
last commit that modified the pathpublic CommitFilter reset()
CommitFilterreset in class CommitFilterpublic org.eclipse.jgit.revwalk.filter.RevFilter clone()
CommitFilter
The default implementation throws a UnsupportedOperationException
and sub-classes should override if filter cloning is supported.
clone in class CommitFilterRevFilter.clone()Copyright © 2011-2015. All Rights Reserved.