summaryrefslogtreecommitdiff
path: root/tests/merge
Commit message (Collapse)AuthorAgeFilesLines
* git_diff_generated: abstract generated diffsEdward Thomson2016-05-261-0/+1
|
* merge drivers: handle configured but not found driverEdward Thomson2016-03-171-0/+18
|
* merge driver: remove `check` callbackEdward Thomson2016-03-171-124/+7
| | | | | | Since the `apply` callback can defer, the `check` callback is not necessary. Removing the `check` callback further makes the `payload` unnecessary along with the `cleanup` callback.
* merge driver: tests for set and unset merge attributeEdward Thomson2016-03-171-1/+36
| | | | | | | Ensure that setting the merge attribute forces the built-in default `text` driver and does *not* honor the `merge.default` configuration option. Further ensure that unsetting the merge attribute forces a conflict (the `binary` driver).
* merge driver: tests for custom default merge driversEdward Thomson2016-03-171-0/+59
|
* merge driver: test GIT_EMERGECONFLICTEdward Thomson2016-03-171-0/+90
| | | | | When a `check` or `apply` callback function returns `GIT_EMERGECONFLICT` stop and product a conflict.
* merge driver: test GIT_PASSTHROUGHEdward Thomson2016-03-171-0/+95
| | | | | When a `check` or `apply` callback function returns `GIT_PASSTHROUGH`, move on to the default merge driver.
* merge driver: introduce custom merge driversEdward Thomson2016-03-171-0/+208
| | | | | | | | Consumers can now register custom merged drivers with `git_merge_driver_register`. This allows consumers to support the merge drivers, as configured in `.gitattributes`. Consumers will be asked to perform the file-level merge when a custom driver is configured.
* Fix rebase bug and include test for merge=unionStan Hu2016-03-171-0/+36
|
* merge::workdir::dirty: update to use `st_ctime_nsec`Edward Thomson2016-03-071-2/+2
| | | | | Update unit test to use newfangled `st_ctime_nsec`, which provides indirection to the platform-correct name.
* win32: introduce p_timeval that isn't stupidEdward Thomson2016-02-121-1/+1
| | | | | Windows defines `timeval` with `long`, which we cannot sanely cope with. Instead, use a custom timeval struct.
* merge tests: correct castsEdward Thomson2016-02-111-3/+3
|
* recursive merge: add a recursion limitEdward Thomson2015-11-251-0/+31
|
* merge: handle conflicts in recursive base buildingEdward Thomson2015-11-253-1/+145
| | | | | | | | | | | | | | | | | When building a recursive merge base, allow conflicts to occur. Use the file (with conflict markers) as the common ancestor. The user has already seen and dealt with this conflict by virtue of having a criss-cross merge. If they resolved this conflict identically in both branches, then there will be no conflict in the result. This is the best case scenario. If they did not resolve the conflict identically in the two branches, then we will generate a new conflict. If the user is simply using standard conflict output then the results will be fairly sensible. But if the user is using a mergetool or using diff3 output, then the common ancestor will be a conflict file (itself with diff3 output, haha!). This is quite terrible, but it matches git's behavior.
* merge tests: add complex recursive exampleEdward Thomson2015-11-251-0/+28
|
* recursive: test conflict output during recursive mergeEdward Thomson2015-11-252-0/+81
|
* merge tests: move expected data into own fileEdward Thomson2015-11-256-44/+47
|
* merge: add recursive test with conflicting contentsEdward Thomson2015-11-251-0/+23
|
* merge: add recursive test with three merge basesEdward Thomson2015-11-251-0/+46
|
* merge: improve test names in recursive merge testsEdward Thomson2015-11-251-8/+8
|
* merge: add a third-level recursive mergeEdward Thomson2015-11-251-0/+46
|
* merge: add a second-level recursive mergeEdward Thomson2015-11-251-2/+48
|
* merge: add simple recursive testEdward Thomson2015-11-252-1/+112
| | | | | Add a simple recursive test - where multiple ancestors exist and creating a virtual merge base from them would prevent a conflict.
* merge: rename `git_merge_tree_flags_t` -> `git_merge_flags_t`Edward Thomson2015-11-253-5/+5
|
* Merge pull request #3170 from CmdrMoozy/nsec_fixCarlos Martín Nieto2015-11-121-1/+6
|\ | | | | git_index_entry__init_from_stat: set nsec fields in entry stats
| * cmake: Only provide USE_NSEC if struct stat members are avilable.Axel Rasmussen2015-09-181-2/+1
| | | | | | | | | | | | This allows us to remove OS checks from source code, instead relying on CMake to detect whether or not `struct stat` has the nanoseconds members we rely on.
| * cmake: add USE_NSEC, and only check nanosec m/ctime if enabledAxel Rasmussen2015-09-181-1/+7
| |
* | merge: add GIT_MERGE_TREE_FAIL_ON_CONFLICTEdward Thomson2015-10-222-5/+22
| | | | | | | | | | | | Provide a new merge option, GIT_MERGE_TREE_FAIL_ON_CONFLICT, which will stop on the first conflict and fail the merge operation with GIT_EMERGECONFLICT.
* | diff: don't feed large files to xdiffEdward Thomson2015-10-051-3/+3
| |
* | merge_file: treat large files as binaryEdward Thomson2015-10-051-0/+88
|/ | | | | | | | xdiff craps the bed on large files. Treat very large files as binary, so that it doesn't even have to try. Refactor our merge binary handling to better match git.git, which looks for a NUL in the first 8000 bytes.
* iterator: use an options struct instead of argsEdward Thomson2015-08-281-6/+6
|
* Merge branch 'portable-zu'Carlos Martín Nieto2015-07-121-1/+1
|\
| * Fix #3094 - improve use of portable size_t/ssize_t format specifiers.Matthew Plough2015-07-121-1/+1
| | | | | | | | The header src/cc-compat.h defines portable format specifiers PRIuZ, PRIdZ, and PRIxZ. The original report highlighted the need to use these specifiers in examples/network/fetch.c. For this commit, I checked all C source and header files not in deps/ and transitioned to the appropriate format specifier where appropriate.
* | merge_files: don't add trailing newlinesEdward Thomson2015-07-071-0/+39
|/ | | | | When invoked with three files that each lack a trailing newline, the merge result should also lack a trailing newline.
* merge: work around write-side racy protection when hacking the indexCarlos Martín Nieto2015-06-221-1/+14
| | | | | | | | | | As we attempt to replicate a situation in which an older checkout has put a file on disk with different filtering settings from us, set the timestamp on the entry and file to a second before we're performing the operation so the entry in the index counts as old. This way we can test that we're not looking at the on-disk file when the index has the entry and we detect it as clean.
* merge::workdir::dirty: tick idx to defeat racy-gitEdward Thomson2015-06-161-0/+12
|
* introduce `git_index_entry_is_conflict`Edward Thomson2015-05-282-2/+2
| | | | | | | | | It's not always obvious the mapping between stage level and conflict-ness. More importantly, this can lead otherwise sane people to write constructs like `if (!git_index_entry_stage(entry))`, which (while technically correct) is unreadable. Provide a nice method to help avoid such messy thinking.
* merge: merge iteratorsEdward Thomson2015-05-111-1/+13
|
* Collapse whitespace flags into git_merge_file_flags_tJacques Germishuys2015-03-162-4/+4
|
* Renamed git_merge_options 'flags' to 'tree_flags'Jacques Germishuys2015-03-162-4/+4
|
* Added tests to merge files and branches with whitespace problems and fixesJacques Germishuys2015-03-162-0/+158
|
* reset: remove reflog message overrideCarlos Martín Nieto2015-03-033-8/+8
| | | | | This function is meant to simulate what git does in the reset command, so we should include the reflog message in that.
* Remove the signature from ref-modifying functionsCarlos Martín Nieto2015-03-035-11/+11
| | | | | | | | | | 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.
* merge: lock the index at the start of the mergeEdward Thomson2015-02-141-0/+49
| | | | | | | | | | Always lock the index when we begin the merge, before we write any of the metdata files. This prevents a race where another client may run a commit after we have written the MERGE_HEAD but before we have updated the index, which will produce a merge commit that is treesame to one parent. The merge will finish and update the index and the resultant commit would not be a merge at all.
* merge test: test an actual failure, not conflictEdward Thomson2015-02-131-6/+5
| | | | | | Correct the merge failed cleanup test. Merge data should not be cleaned up on conflicts, only on actual failure. And ORIG_HEAD should not be removed at all.
* Fix broken merge tests due to autocrlf was not falseLinquize2014-12-071-0/+8
|
* s/git_merge_head/git_annotated_commitEdward Thomson2014-10-267-280/+282
| | | | | Rename git_merge_head to git_annotated_commit, as it becomes used in more operations than just merge.
* Merge pull request #2499 from csware/hard-reset-checkout-callbacksCarlos Martín Nieto2014-10-103-8/+8
|\ | | | | Allow to propagate checkout callbacks to git HARD reset
| * Allow to propagate checkout callbacks to git HARD resetSven Strickroth2014-08-033-8/+8
| | | | | | | | Signed-off-by: Sven Strickroth <email@cs-ware.de>
* | hashsig: Export as a `sys` headervmg/hashsigVicent Marti2014-10-011-1/+1
| |