git-mv is not able to handle big directories
[gitweb.git] / diff-delta.c
index 67f60814b714493568add5a92df4a8acf8085a14..b2ae7b5e6c3b4aa409ccfa60f67d5c8eb1690504 100644 (file)
@@ -306,12 +306,13 @@ void *diff_delta(void *from_buf, unsigned long from_size,
                        *orig = i;
                }
 
-               /* next time around the largest possible output is 1 + 4 + 3 */
                if (max_size && outpos > max_size) {
                        free(out);
                        delta_cleanup(&bdf);
                        return NULL;
                }
+
+               /* next time around the largest possible output is 1 + 4 + 3 */
                if (outpos > outsize - 8) {
                        void *tmp = out;
                        outsize = outsize * 3 / 2;