Commit Briefs
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.
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.
diff result: ensure sane order of result chunks
Ensure that a adjacent chunks of same type are combined, and that a minus block always precedes an adjacent plus block. The upcoming myers-divide optimization is prone to produce weird ordering of plus and minus chunks.
move 'struct range' and related functions into the diff_ namespace
no functional change