commit - acfce337ad1e68d4ab00bd78bdb6dd459acc3c46
commit + 746d94dfa3a4c965501cde5bb0a59a168cc2ab44
blob - 1380f79ea94f4492b19d3d7e5851c1205e4383da
blob + 73eeffeb2f2c32acdb1121c77d1186c4504bc025
--- lib/diff_main.c
+++ lib/diff_main.c
struct diff_state *state)
{
int rc;
- ARRAYLIST_FREE(state->temp_result);
if (!algo_config || !algo_config->impl
- || !state->recursion_depth_left) {
- debug("MAX RECURSION REACHED, just dumping diff chunks\n");
+ || !state->recursion_depth_left
+ || !state->left.atoms.len || !state->right.atoms.len) {
+ debug("Fall back to diff_algo_none():%s%s%s\n",
+ (!algo_config || !algo_config->impl) ? " no-cfg" : "",
+ (!state->recursion_depth_left) ? " max-depth" : "",
+ (!state->left.atoms.len || !state->right.atoms.len)?
+ " trivial" : "");
return diff_algo_none(algo_config, state);
}
+ ARRAYLIST_FREE(state->temp_result);
ARRAYLIST_INIT(state->temp_result, DIFF_RESULT_ALLOC_BLOCKSIZE);
rc = algo_config->impl(algo_config, state);
switch (rc) {