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