Commits


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


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


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


diff: drop -p, add -P -Q -T; diffreg(): use algo enum -p is traditionally used for "show which C function each change is in", so don't use it for choosing Patience. Instead add two options for using Patience, -P for only Patience and -Q to attempt forward-Myers first. Also add -T for a trivial diff (diff_algo_none).


add a diff output mode which produces simple ed(1) scripts


add a zero-context test and rename the -C option to -U (matches diff(1))


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


optionally provide information about the generated diff to the API user


convert 'ignore_whitespace' boolean into a more general flags argument


use buffered stdio if falling back on file i/o; this is much faster


remove another custom linux shim in favour of compat/ directory


enable -Wstrict-prototype and -Wunused-variable in Linux build


add a -C option which sets the amount of context lines in unified diffs


add support for ignoring whitespace (-w option) Tests grow the ability to call diff with options. Options to use are encoded in the test file name as a single dash followed by a string of option letters. E.g. -wp for 'ignore whitespace' and 'do patience'


avoid include statements in header files; make each .c pull in what's needed


replace enum diff_rc errors with plain errno values


fall back on file i/o in case an input file cannot be memory-mapped


KNF: use max 80 columns


diff cmdline tool: allow using Patience by -p arg


remove code dup of diff_main() invocation for plain vs unidiff


diff.c: move two #include to the top


myers: permit ~4Mb of state


switch default to unidiff


initial commit