summaryrefslogtreecommitdiff
path: root/tests/diff/rename.c
Commit message (Collapse)AuthorAgeFilesLines
* diff: introduce binary diff callbacksEdward Thomson2015-06-121-55/+55
| | | | | | | Introduce a new binary diff callback to provide the actual binary delta contents to callers. Create this data from the diff contents (instead of directly from the ODB) to support binary diffs including the workdir, not just things coming out of the ODB.
* diff_tform: account for whitespace optionsEdward Thomson2015-03-041-6/+68
| | | | | When comparing seemingly blank files, take whitespace options into account.
* diff_tform: don't compare empty hashsig_heapsEdward Thomson2015-03-031-0/+38
| | | | Don't try to compare two empty hashsig_heaps.
* Remove the signature from ref-modifying functionsCarlos Martín Nieto2015-03-031-3/+3
| | | | | | | | | | The signature for the reflog is not something which changes dynamically. Almost all uses will be NULL, since we want for the repository's default identity to be used, making it noise. In order to allow for changing the identity, we instead provide git_repository_set_ident() and git_repository_ident() which allow a user to override the choice of signature.
* Added GIT_HASHSIG_ALLOW_SMALL_FILES to allow computing signatures for small ↵Pierre-Olivier Latour2015-01-141-19/+35
| | | | | | | | | | | | | files The implementation of the hashsig API disallows computing a signature on small files containing only a few lines. This new flag disables this behavior. git_diff_find_similar() sets this flag by default which means that rename / copy detection of small files will now work. This in turn affects the behavior of the git_status and git_blame APIs which will now detect rename of small files assuming the right options are passed.
* git_checkout_opts -> git_checkout_optionsBen Straub2014-03-061-3/+3
|
* Drop git_patch_to_strNicolas Hake2014-01-221-4/+4
| | | | | | | It's hard or even impossible to correctly free the string buffer allocated by git_patch_to_str in some circumstances. Drop the function so people have to use git_patch_to_buf instead - git_buf has a dedicated destructor.
* refs: remove the _with_log differentiationCarlos Martín Nieto2014-01-151-3/+3
| | | | | | Any well-behaved program should write a descriptive message to the reflog whenever it updates a reference. Let's make this more prominent by removing the version without the reflog parameters.
* Remove converting user error to GIT_EUSERRussell Belfer2013-12-111-0/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This changes the behavior of callbacks so that the callback error code is not converted into GIT_EUSER and instead we propagate the return value through to the caller. Instead of using the giterr_capture and giterr_restore functions, we now rely on all functions to pass back the return value from a callback. To avoid having a return value with no error message, the user can call the public giterr_set_str or some such function to set an error message. There is a new helper 'giterr_set_callback' that functions can invoke after making a callback which ensures that some error message was set in case the callback did not set one. In places where the sign of the callback return value is meaningful (e.g. positive to skip, negative to abort), only the negative values are returned back to the caller, obviously, since the other values allow for continuing the loop. The hardest parts of this were in the checkout code where positive return values were overloaded as meaningful values for checkout. I fixed this by adding an output parameter to many of the internal checkout functions and removing the overload. This added some code, but it is probably a better implementation. There is some funkiness in the network code where user provided callbacks could be returning a positive or a negative value and we want to rely on that to cancel the loop. There are still a couple places where an user error might get turned into GIT_EUSER there, I think, though none exercised by the tests.
* Don't clobber whitespace settingsBen Straub2013-12-061-0/+42
|
* Don't use weird return codesBen Straub2013-12-051-0/+3
|
* Implement GIT_DIFF_FIND_BY_CONFIGBen Straub2013-12-051-0/+138
|
* GIT_DIFF_FIND_REMOVE_UNMODIFIED sounds betterRussell Belfer2013-12-021-1/+1
|
* Add GIT_DIFF_FIND_DELETE_UNMODIFIED flagRussell Belfer2013-12-021-0/+48
| | | | | | | | | | When doing copy detection, it is often necessary to include UNMODIFIED records in the git_diff so they are available as source records for GIT_DIFF_FIND_COPIES_FROM_UNMODIFIED. Yet in the final diff, often you will not want to have these UNMODIFIED records. This adds a flag which marks these UNMODIFIED records for deletion from the diff list so they will be removed after the rename detect phase is over.
* Fix bug making split deltas a COPIED targetsRussell Belfer2013-12-021-0/+49
| | | | | | | | When FIND_COPIES is used in combination with BREAK_REWRITES for rename detection, there was a bug where the split MODIFIED delta was only used as a target for RENAME records and not for COPIED records. This fixes that, converting the split into a pair of DELETED and COPIED deltas when that circumstance arises.
* Rename tests-clar to testsBen Straub2013-11-141-0/+1286