We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3ebfe63 commit ee542eeCopy full SHA for ee542ee
diffcore-rename.c
@@ -468,10 +468,11 @@ void diffcore_rename(struct diff_options *options)
468
*/
469
if (rename_limit <= 0 || rename_limit > 32767)
470
rename_limit = 32767;
471
- if (num_create > rename_limit && num_src > rename_limit)
472
- goto cleanup;
473
- if (num_create * num_src > rename_limit * rename_limit)
+ if ((num_create > rename_limit && num_src > rename_limit) ||
+ (num_create * num_src > rename_limit * rename_limit)) {
+ warning("too many files, skipping inexact rename detection");
474
goto cleanup;
475
+ }
476
477
mx = xmalloc(sizeof(*mx) * num_create * num_src);
478
for (dst_cnt = i = 0; i < rename_dst_nr; i++) {
0 commit comments