Commit d55ed0636eefeb43ad1aa8123416c33839652646

Paul Eggert 2016-10-25T14:59:29

diffseq: restore TOO_EXPENSIVE heuristic * lib/diffseq.h: Problem with diffutils reported by Andreas Schwab (Bug#24715). The simplest solution is to restore the TOO_EXPENSIVE heuristic that I added to GNU diff in 1993, while using a higher threshold to avoid Bug#16848 on smaller files. * lib/diffseq.h (struct context): Restore member too_expensive. (struct partition): Restore members lo_minimal, hi_minimal. (diag, compareseq): Restore arg find_minimal. All uses changed. (diag): Restore the TOO_EXPENSIVE heuristic that I added back in 1993 to make 'diff' run faster (but not as well) on large inputs, but use a threshold of 4096 instead of the old 256. * lib/fstrcmp.c (strcmp_bounded): * lib/git-merge-changelog.c (compute_differences): Adjust to diffseq.h changes.