summaryrefslogtreecommitdiff
path: root/tests-clar/diff/diff_helpers.h
Commit message (Collapse)AuthorAgeFilesLines
* Diff iteratorsRussell Belfer2012-09-051-0/+6
| | | | | | | | | | | 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.
* diff: fix the diffing of two identical blobsnulltoken2012-05-071-0/+1
|
* diff: make git_diff_blobs() able to detect binary blobsnulltoken2012-05-071-0/+2
|
* diff: provide more context to the consumer of the callbacksnulltoken2012-04-301-0/+1
| | | | Update the callback to provide some information related to the file change being processed and the range of the hunk, when applicable.
* Update diff to use iteratorsRussell Belfer2012-03-021-0/+2
| | | | | | | | | | | | | This is a major reorganization of the diff code. This changes the diff functions to use the iterators for traversing the content. This allowed a lot of code to be simplified. Also, this moved the functions relating to outputting a diff into a new file (diff_output.c). This includes a number of other changes - adding utility functions, extending iterators, etc. plus more tests for the diff code. This also takes the example diff.c program much further in terms of emulating git-diff command line options.
* Continue implementation of git-diffRussell Belfer2012-03-021-0/+1
| | | | | | | | * Implemented git_diff_index_to_tree * Reworked git_diff_options structure to handle more options * Made most of the options in git_diff_options actually work * Reorganized code a bit to remove some redundancy * Added option parsing to examples/diff.c to test most options
* Clean up diff implementation for reviewRussell Belfer2012-03-021-0/+36
| | | | | | | This fixes several bugs, updates tests and docs, eliminates the FILE* assumption in favor of printing callbacks for the diff patch formatter helpers, and adds a "diff" example function that can perform a diff from the command line.
* Uniform iterators for trees, index, and workdirRussell Belfer2012-02-211-0/+4
This create a new git_iterator type of object that provides a uniform interface for iterating over the index, an arbitrary tree, or the working directory of a repository. As part of this, git ignore support was extended to support push and pop of directory-based ignore files as the working directory is being traversed (so the array of ignores does not have to be recreated at each directory during traveral). There are a number of other small utility functions in buffer, path, vector, and fileops that are included in this patch that made the iterator implementation cleaner.