summaryrefslogtreecommitdiff
path: root/tests-clar/diff/rename.c
Commit message (Collapse)AuthorAgeFilesLines
* Fix diff output for renames and copiesRussell Belfer2013-05-101-1/+54
| | | | | | | | | | If you use rename detection, the renamed and copied files would not show any text diffs because the function that decides if data should be loaded didn't know which sides of the diff to load for those cases. This adds a test that looks at the patch generated for diff entries that are COPIED or RENAMED.
* handle small files in similarity metricsEdward Thomson2013-03-111-0/+33
|
* Fix a few leaksCarlos Martín Nieto2013-03-041-0/+1
| | | | | | | | | `git_diff_get_patch()` would unconditionally load the patch object and then simply leak it if the user hadn't requested it. Short-circuit loading the object if the user doesn't want it. The rest of the plugs are simply calling the free functions of objects allocated during the tests.
* More rename detection testsRussell Belfer2013-02-221-15/+99
| | | | | | This includes tests for crlf changes, whitespace changes with the default comparison and with the ignore whitespace comparison, and more sensitivity checking for the comparison code.
* Fix tests for find_similar and relatedRussell Belfer2013-02-221-5/+32
| | | | | | | | This fixes both a test that I broke in diff::patch where I was relying on the current state of the working directory for the renames test data and fixes an unstable test in diff::rename where the environment setting for the "diff.renames" config was being allowed to influence the test results.
* Add diff rename tests with partial similarityRussell Belfer2013-02-211-2/+115
| | | | | | | | | | | | | | This adds some new tests that actually exercise the similarity metric between files to detect renames, copies, and split modified files that are too heavily modified. There is still more testing to do - these tests are just partially covering the cases. There is also one bug fix in this where a change set with only MODIFY being broken into ADD/DELETE (due to low self-similarity) without any additional RENAMED entries would end up not processing the split requests (because the num_rewrites counter got reset).
* Deploy GIT_DIFF_FIND_OPTIONS_INITBen Straub2012-11-301-2/+33
|
* Deploy GIT_DIFF_OPTIONS_INITBen Straub2012-11-301-2/+1
|
* Update diff callback param orderRussell Belfer2012-11-271-3/+3
| | | | | | | | This makes the diff functions that take callbacks both take the payload parameter after the callback function pointers and pass the payload as the last argument to the callback function instead of the first. This should make them consistent with other callbacks across the API.
* More external API cleanupVicent Marti2012-11-271-3/+3
| | | | | | Conflicts: src/branch.c tests-clar/refs/branches/create.c
* Fix diff API to better parameter orderRussell Belfer2012-11-141-2/+2
| | | | | The diff API is not in the parameter order one would expect from other libgit2 APIs. This fixes that.
* Move rename detection into new fileRussell Belfer2012-10-301-5/+5
| | | | | | | | | | | | | | | This improves the naming for the rename related functionality moving it to be called `git_diff_find_similar()` and renaming all the associated constants, etc. to make more sense. I also moved the new code (plus the existing `git_diff_merge`) into a new file `diff_tform.c` where I can put new functions related to manipulating git diff lists. This also updates the implementation significantly from the last revision fixing some ordering issues (where break-rewrite needs to be handled prior to copy and rename detection) and improving config option handling.
* Initial implementation of diff rename detectionRussell Belfer2012-10-231-0/+105
This implements the basis for diff rename and copy detection, although it is based on simple SHA comparison right now instead of using a matching algortihm. Just as `git_diff_merge` can be used as a post-pass on diffs to emulate certain command line behaviors, there is a new API `git_diff_detect` which will update a diff list in-place, adjusting some deltas to RENAMED or COPIED state (and also, eventually, splitting MODIFIED deltas where the change is too large into DELETED/ADDED pairs). This also adds a new test repo that will hold rename/copy/split scenarios. Right now, it just has exact-match rename and copy, but the tests are written to use tree diffs, so we should be able to add new test scenarios easily without breaking tests.