Commit Briefs


86b603da30 Neels Hofmeyr

patience: do not swallow identical neighbors

This does not make much sense, because if common-unique lines swallow their neighboring ones, they count less, and another bad, shorter sequence may gain more weight than a very long sequence that was combined to just one common-unique chunk. It also much simplifies the code and avoids bugs we had to implement complex fixes for before.


fe6d58fb52 Christian Weisgerber

add a missing include for uint8_t and switch from <inttypes.h> to <stdint.h>

ok millert stsp


ab378e1f5d Stefan Sperling

fix patience diff assertion failure exposed by test122




46093fc37f Neels Hofmeyr

remove stray blank line


10ae3a6560 Neels Hofmeyr

patience debug


a5de263314 Neels Hofmeyr

patience comments


9f9e0ab43b Neels Hofmeyr

cosmetic: patience: use local var 'r' for right atom


ca1af24580 Neels Hofmeyr

cosmetic: rename local var from 'r' to 'rc'


1c7f8717f7 Neels Hofmeyr

patience: use qsort


72e4a018d5 Neels Hofmeyr

patience: optimize: less diff_atom_cmp() via hash



49307efefc Neels Hofmeyr

debug: patience: mark unique debug


ca6fcbdce0 Neels Hofmeyr

patience: make it easy to switch impls for mark_unique



12c5bde7b2 Stefan Sperling

use mergesort(3) instead of qsort(3) in patience diff

Fixes test failures on OpenBSD due to unstable results of qsort if two or more elements are equal. Add a compat copy of OpenBSD mergesort(3) for Linux.



227cd87e53 Stefan Sperling

wrap a comment that had overlong lines



6c8c5d3f0b Neels Hofmeyr

move patience data out of struct diff_atom

Now allocating patience specific data only when patience is going to be used. This may allow using forward-Myers more often, since the state size per line is significantly smaller. Patience instead allocates an array, puts it in the current diff_data, and also place a pointer of the current diff_data in the root diff_data (since each atom points to the root diff_data).


60b6e08bf7 Neels Hofmeyr

patience: use qsort to optimize finding unique lines



2a1b94d029 Stefan Sperling

repair DEBUG build