if (pm == null)
pm = NullProgressMonitor.INSTANCE;
+
+ if (0 < breakScore)
breakModifies(reader, pm);
+
+ if (!added.isEmpty() && !deleted.isEmpty())
findExactRenames(pm);
+
+ if (!added.isEmpty() && !deleted.isEmpty())
findContentRenames(reader, pm);
+
+ if (0 < breakScore && !added.isEmpty() && !deleted.isEmpty())
rejoinModifies(pm);
entries.addAll(added);
private void breakModifies(ContentSource.Pair reader, ProgressMonitor pm)
throws IOException {
- if (breakScore <= 0)
- return;
-
ArrayList<DiffEntry> newEntries = new ArrayList<DiffEntry>(entries.size());
pm.beginTask(JGitText.get().renamesBreakingModifies, entries.size());
ProgressMonitor pm)
throws IOException {
int cnt = Math.max(added.size(), deleted.size());
- if (cnt == 0)
- return;
-
if (getRenameLimit() == 0 || cnt <= getRenameLimit()) {
SimilarityRenameDetector d;
@SuppressWarnings("unchecked")
private void findExactRenames(ProgressMonitor pm) {
- if (added.isEmpty() || deleted.isEmpty())
- return;
-
pm.beginTask(JGitText.get().renamesFindingExact, //
added.size() + added.size() + deleted.size()
+ added.size() * deleted.size());