Commits


handle binary files like diff(1) does; new -a option forces text


expose struct diff_atom in public API for external atomizer implementations


allow diff API users to atomize files separately This is a breaking API change (not that we care about that at this point). This can avoid redundant work spent on atomizing a file multiple times. There are use cases where one particular file must be compared to other files over and over again, such as when blaming file history. The old API gave access to both versions of the file to the atomizer just in case a future atomizer implementation needs this. This can still be achieved by passing a second file via the atomizer's private data pointer.


add support for showing function prototypes in unidiff hunk headers


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).


patience: use qsort to optimize finding unique lines


cosmetic: indents in diff_main.h


move headers from include/diff/ to include/; makes things easier for consumers