- java.lang.Object
-
- org.eclipse.jgit.internal.diff.FilteredRenameDetector
-
public class FilteredRenameDetector extends Object
Provides rename detection in special cases such as blame, where only a subset of the renames detected byRenameDetectoris of interest.
-
-
Constructor Summary
Constructors Constructor Description FilteredRenameDetector(RenameDetector renameDetector)FilteredRenameDetector(Repository repository)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<DiffEntry>compute(List<DiffEntry> changes, List<PathFilter> pathFilters)Tries to avoid computation overhead inRenameDetector.compute()by filtering diffs related to the path filters only.List<DiffEntry>compute(List<DiffEntry> diffs, PathFilter pathFilter)
-
-
-
Constructor Detail
-
FilteredRenameDetector
public FilteredRenameDetector(Repository repository)
- Parameters:
repository- The repository in which to check for renames.
-
FilteredRenameDetector
public FilteredRenameDetector(RenameDetector renameDetector)
- Parameters:
renameDetector- TheRenameDetectorto use when checking for renames.
-
-
Method Detail
-
compute
public List<DiffEntry> compute(List<DiffEntry> diffs, PathFilter pathFilter) throws IOException
- Parameters:
diffs- The set of changes to check.pathFilter- Filter out changes that didn't affect this path.- Returns:
- The subset of changes that affect only the filtered path.
- Throws:
IOException
-
compute
public List<DiffEntry> compute(List<DiffEntry> changes, List<PathFilter> pathFilters) throws IOException
Tries to avoid computation overhead inRenameDetector.compute()by filtering diffs related to the path filters only.Note: current implementation only optimizes added or removed diffs, further optimization is possible.
- Parameters:
changes- The set of changes to check.pathFilters- Filter out changes that didn't affect these paths.- Returns:
- The subset of changes that affect only the filtered paths.
- Throws:
IOException- See Also:
RenameDetector.compute()
-
-