]> git.ipfire.org Git - thirdparty/git.git/blobdiff - diffcore-rename.c
Do exact rename detection regardless of rename limits
[thirdparty/git.git] / diffcore-rename.c
index e7e370b2cc1e66f7724755c1b33f2a815b7223bf..394693222d5ef9e1f73cb84d271bdcee037d36ad 100644 (file)
@@ -428,6 +428,12 @@ void diffcore_rename(struct diff_options *options)
        if (rename_dst_nr == 0 || rename_src_nr == 0)
                goto cleanup; /* nothing to do */
 
+       /*
+        * We really want to cull the candidates list early
+        * with cheap tests in order to avoid doing deltas.
+        */
+       rename_count = find_exact_renames();
+
        /*
         * This basically does a test for the rename matrix not
         * growing larger than a "rename_limit" square matrix, ie:
@@ -444,12 +450,6 @@ void diffcore_rename(struct diff_options *options)
        if (rename_dst_nr * rename_src_nr > rename_limit * rename_limit)
                goto cleanup;
 
-       /*
-        * We really want to cull the candidates list early
-        * with cheap tests in order to avoid doing deltas.
-        */
-       rename_count = find_exact_renames();
-
        /* Have we run out the created file pool?  If so we can avoid
         * doing the delta matrix altogether.
         */