@@ -434,7 +434,7 @@ static void record_if_better(struct diff_score m[], struct diff_score *o)
434
434
* 1 if we need to disable inexact rename detection;
435
435
* 2 if we would be under the limit if we were given -C instead of -C -C.
436
436
*/
437
- static int too_many_rename_candidates (int num_create ,
437
+ static int too_many_rename_candidates (int num_destinations ,
438
438
struct diff_options * options )
439
439
{
440
440
int rename_limit = options -> rename_limit ;
@@ -447,17 +447,17 @@ static int too_many_rename_candidates(int num_create,
447
447
* This basically does a test for the rename matrix not
448
448
* growing larger than a "rename_limit" square matrix, ie:
449
449
*
450
- * num_create * num_src > rename_limit * rename_limit
450
+ * num_destinations * num_src > rename_limit * rename_limit
451
451
*/
452
452
if (rename_limit <= 0 )
453
453
rename_limit = 32767 ;
454
- if ((num_create <= rename_limit || num_src <= rename_limit ) &&
455
- ((uint64_t )num_create * (uint64_t )num_src
454
+ if ((num_destinations <= rename_limit || num_src <= rename_limit ) &&
455
+ ((uint64_t )num_destinations * (uint64_t )num_src
456
456
<= (uint64_t )rename_limit * (uint64_t )rename_limit ))
457
457
return 0 ;
458
458
459
459
options -> needed_rename_limit =
460
- num_src > num_create ? num_src : num_create ;
460
+ num_src > num_destinations ? num_src : num_destinations ;
461
461
462
462
/* Are we running under -C -C? */
463
463
if (!options -> flags .find_copies_harder )
@@ -469,8 +469,8 @@ static int too_many_rename_candidates(int num_create,
469
469
continue ;
470
470
num_src ++ ;
471
471
}
472
- if ((num_create <= rename_limit || num_src <= rename_limit ) &&
473
- ((uint64_t )num_create * (uint64_t )num_src
472
+ if ((num_destinations <= rename_limit || num_src <= rename_limit ) &&
473
+ ((uint64_t )num_destinations * (uint64_t )num_src
474
474
<= (uint64_t )rename_limit * (uint64_t )rename_limit ))
475
475
return 2 ;
476
476
return 1 ;
@@ -505,7 +505,7 @@ void diffcore_rename(struct diff_options *options)
505
505
struct diff_queue_struct outq ;
506
506
struct diff_score * mx ;
507
507
int i , j , rename_count , skip_unmodified = 0 ;
508
- int num_create , dst_cnt ;
508
+ int num_destinations , dst_cnt ;
509
509
struct progress * progress = NULL ;
510
510
511
511
if (!minimum_score )
@@ -570,13 +570,13 @@ void diffcore_rename(struct diff_options *options)
570
570
* Calculate how many renames are left (but all the source
571
571
* files still remain as options for rename/copies!)
572
572
*/
573
- num_create = (rename_dst_nr - rename_count );
573
+ num_destinations = (rename_dst_nr - rename_count );
574
574
575
575
/* All done? */
576
- if (!num_create )
576
+ if (!num_destinations )
577
577
goto cleanup ;
578
578
579
- switch (too_many_rename_candidates (num_create , options )) {
579
+ switch (too_many_rename_candidates (num_destinations , options )) {
580
580
case 1 :
581
581
goto cleanup ;
582
582
case 2 :
@@ -593,7 +593,8 @@ void diffcore_rename(struct diff_options *options)
593
593
(uint64_t )rename_dst_nr * (uint64_t )rename_src_nr );
594
594
}
595
595
596
- mx = xcalloc (st_mult (NUM_CANDIDATE_PER_DST , num_create ), sizeof (* mx ));
596
+ mx = xcalloc (st_mult (NUM_CANDIDATE_PER_DST , num_destinations ),
597
+ sizeof (* mx ));
597
598
for (dst_cnt = i = 0 ; i < rename_dst_nr ; i ++ ) {
598
599
struct diff_filespec * two = rename_dst [i ].two ;
599
600
struct diff_score * m ;
0 commit comments