Documentation: Point to gitcli(7) from git(1)
[gitweb.git] / diffcore-rename.c
index 5974362d3b38a1445f02c35130f52c0661861b5e..1b2ebb40014d820fe4fb679509ab694d453be7b4 100644 (file)
@@ -490,10 +490,12 @@ void diffcore_rename(struct diff_options *options)
         */
        if (rename_limit <= 0 || rename_limit > 32767)
                rename_limit = 32767;
-       if (num_create > rename_limit && num_src > rename_limit)
-               goto cleanup;
-       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)) {
+               if (options->warn_on_too_large_rename)
+                       warning("too many files, skipping inexact rename detection");
                goto cleanup;
+       }
 
        mx = xcalloc(num_create * NUM_CANDIDATE_PER_DST, sizeof(*mx));
        for (dst_cnt = i = 0; i < rename_dst_nr; i++) {