summaryrefslogtreecommitdiff
path: root/tests-clar/diff/diffiter.c
Commit message (Collapse)AuthorAgeFilesLines
* Add git_diff_patch_to_str APIRussell Belfer2012-10-241-0/+99
| | | | | This adds an API to generate a complete single-file patch text from a git_diff_patch object.
* Clean up Win64 warningsRussell Belfer2012-09-281-6/+6
|
* Add const to all shared pointers in diff APIRussell Belfer2012-09-251-9/+9
| | | | | | | | | | 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!
* Fix bugs in new diff patch codeRussell Belfer2012-09-251-5/+7
| | | | | | | | | 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.
* Initial implementation of new diff patch APIRussell Belfer2012-09-251-67/+208
| | | | | | | | 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.
* Fix diff binary file detectionRussell Belfer2012-09-111-0/+85
| | | | | | | | | | | 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.
* Diff iteratorsRussell Belfer2012-09-051-0/+116
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.