Commit Briefs


Neels Hofmeyr

add sanity assertions around adding result chunks

uncovers errors related to placing minus chunks above already added plus chunks.



Stefan Sperling

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.







Stefan Sperling

put functions required for using diff_output_unidiff_chunk() into public API

They will be needed to implement 'got stage -p' and 'got revert -p', etc. Chunks stored in diff_result still need post-processing in order to be displayed as expected by diff_output_unidiff_chunk(). Exposing these functions allows API consumers to implement the same chunk merging loop as used internally by output_unidiff() and output_edscript(). (Perhaps, ideally, the public diff API would provide pre-merged chunks at some point in the future? Then this commit could probably be reverted.) Change return values from bool to int to avoid making stdbool.h a requirement for the public diff API.



Stefan Sperling

print "\ No newline at end of file" message like UNIX diff(1) does

Not adding new tests since this behaviour is covered by tests in Got.





Stefan Sperling

fix unidiff headers for empty files





Stefan Sperling

repair DEBUG build


Stefan Sperling

remove an unused variable


Stefan Sperling

check results of ARRAYLIST_ADD