tests-clar/diff/diffiter.c


Log

Author Commit Date CI Message
Ben Straub 2f8d30be 2012-11-29T15:05:04 Deploy GIT_DIFF_OPTIONS_INIT
Russell Belfer bbe6dbec 2012-11-14T23:29:48 Add explicit git_index ptr to diff and checkout A number of diff APIs and the `git_checkout_index` API take a `git_repository` object an operate on the index. This updates them to take a `git_index` pointer explicitly and only fall back on the `git_repository` index if the index input is NULL. This makes it easier to operate on a temporary index.
Russell Belfer 5735bf5e 2012-11-13T13:58:29 Fix diff API to better parameter order The diff API is not in the parameter order one would expect from other libgit2 APIs. This fixes that.
Russell Belfer 93cf7bb8 2012-10-24T20:56:32 Add git_diff_patch_to_str API This adds an API to generate a complete single-file patch text from a git_diff_patch object.
Russell Belfer cc5bf359 2012-09-28T09:08:09 Clean up Win64 warnings
Russell Belfer bae957b9 2012-09-25T16:31:46 Add const to all shared pointers in diff API There are a lot of places where the diff API gives the user access to internal data structures and many of these were being exposed through non-const pointers. This replaces them all with const pointers for any object that the user can access but is still owned internally to the git_diff_list or git_diff_patch objects. This will probably break some bindings... Sorry!
Russell Belfer 64286308 2012-09-25T10:48:50 Fix bugs in new diff patch code This fixes all the bugs in the new diff patch code. The only really interesting one is that when we merge two diffs, we now have to actually exclude diff delta records that are not supposed to be tracked, as opposed to before where they could be included because they would be skipped silently by `git_diff_foreach()`. Other than that, there are just minor errors.
Russell Belfer 5f69a31f 2012-09-24T20:52:34 Initial implementation of new diff patch API Replacing the `git_iterator` object, this creates a simple API for accessing the "patch" for any file pair in a diff list and then gives indexed access to the hunks in the patch and the lines in the hunk. This is the initial implementation of this revised API - it is still broken, but at least builds cleanly.
Russell Belfer 1f35e89d 2012-09-11T12:03:33 Fix diff binary file detection In the process of adding tests for the max file size threshold (which treats files over a certain size as binary) there seem to be a number of problems in the new code with detecting binaries. This should fix those up, as well as add a test for the file size threshold stuff. Also, this un-deprecates `GIT_DIFF_LINE_ADD_EOFNL`, since I finally found a legitimate situation where it would be returned.
Russell Belfer f335ecd6 2012-08-30T14:24:16 Diff iterators This refactors the diff output code so that an iterator object can be used to traverse and generate the diffs, instead of just the `foreach()` style with callbacks. The code has been rearranged so that the two styles can still share most functions. This also replaces `GIT_REVWALKOVER` with `GIT_ITEROVER` and uses that as a common error code for marking the end of iteration when using a iterator style of object.