java.lang.Object
org.eclipse.jgit.internal.diff.FilteredRenameDetector
Provides rename detection in special cases such as blame, where only a subset
of the renames detected by
RenameDetector
is of interest.-
Constructor Summary
ConstructorsConstructorDescriptionFilteredRenameDetector
(RenameDetector renameDetector) FilteredRenameDetector
(Repository repository) -
Method Summary
Modifier and TypeMethodDescriptioncompute
(List<DiffEntry> changes, List<PathFilter> pathFilters) Tries to avoid computation overhead inRenameDetector.compute()
by filtering diffs related to the path filters only.compute
(List<DiffEntry> diffs, PathFilter pathFilter) Compute diff entries
-
Constructor Details
-
FilteredRenameDetector
- Parameters:
repository
- The repository in which to check for renames.
-
FilteredRenameDetector
- Parameters:
renameDetector
- TheRenameDetector
to use when checking for renames.
-
-
Method Details
-
compute
Compute diff entries- 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
- if an IO error occurred
-
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
- if an IO error occurred- See Also:
-