tests/merge


Log

Author Commit Date CI Message
Carlos Martín Nieto 0f299365 2018-12-14T14:29:36 annotated_commit: add failing test for looking up from annotated tag
Edward Thomson 168fe39b 2018-11-28T14:26:57 object_type: use new enumeration names Use the new object_type enumeration names within the codebase.
Patrick Steinhardt 0ddc6094 2018-11-30T09:46:14 Merge pull request #4770 from tiennou/feature/merge-analysis-any-branch Allow merge analysis against any reference
Edward Thomson a2f9f94b 2018-10-20T20:18:04 Merge branch 'issue-4203'
Etienne Samson 6e9fb040 2018-08-25T01:47:39 merge: make analysis possible against a non-HEAD reference This moves the current merge analysis code into a more generic version that can work against any reference. Also change the tests to check returned analysis values exactly.
Patrick Steinhardt 0652abaa 2018-07-20T12:56:49 Merge pull request #4702 from tiennou/fix/coverity Assorted Coverity fixes
Patrick Steinhardt 9994cd3f 2018-06-25T11:56:52 treewide: remove use of C++ style comments C++ style comment ("//") are not specified by the ISO C90 standard and thus do not conform to it. While libgit2 aims to conform to C90, we did not enforce it until now, which is why quite a lot of these non-conforming comments have snuck into our codebase. Do a tree-wide conversion of all C++ style comments to the supported C style comments to allow us enforcing strict C90 compliance in a later commit.
Etienne Samson 8455a270 2018-07-01T12:04:27 tests: add missing cl_git_pass to tests Reported by Coverity, CID 1393678-1393697.
Patrick Steinhardt ecf4f33a 2018-02-08T11:14:48 Convert usage of `git_buf_free` to new `git_buf_dispose`
Edward Thomson b8823c2b 2018-01-22T23:56:22 Add failing test case for virtual commit merge base issue
Edward Thomson afcaf35e 2018-01-21T16:50:40 merge::trees::recursive: test for virtual base building Virtual base building: ensure that the virtual base is created and revwalked in the same way as git.
Edward Thomson b924df1e 2018-01-21T18:05:45 merge: reverse merge bases for recursive merge When the commits being merged have multiple merge bases, reverse the order when creating the virtual merge base. This is for compatibility with git's merge-recursive algorithm, and ensures that we build identical trees. Git does this to try to use older merge bases first. Per 8918b0c: > It seems to be the only sane way to do it: when a two-head merge is > done, and the merge-base and one of the two branches agree, the > merge assumes that the other branch has something new. > > If we start creating virtual commits from newer merge-bases, and go > back to older merge-bases, and then merge with newer commits again, > chances are that a patch is lost, _because_ the merge-base and the > head agree on it. Unlikely, yes, but it happened to me.
Edward Thomson 26f5d36d 2018-02-04T10:27:39 Merge pull request #4489 from libgit2/ethomson/conflicts_crlf Conflict markers should match EOL style in conflicting files
Edward Thomson 2a8841ae 2018-01-21T12:28:13 merge: test CR/LF conflicts for CR/LF files Ensure that when the files being merged have CR/LF line endings that the conflict markers produced in the conflict file also have CR/LF line endings.
Edward Thomson 185b0d08 2018-01-20T19:41:28 merge: recursive uses larger conflict markers Git uses longer conflict markers in the recursive merge base - two more than the default (thus, 9 character long conflict markers). This allows users to tell the difference between the recursive merge conflicts and conflicts between the ours and theirs branches. This was introduced in git d694a17986a28bbc19e2a6c32404ca24572e400f. Update our tests to expect this as well.
David Turner 2a3e0635 2017-12-04T16:56:07 Do not attempt to check out submodule as blob when merging a submodule modify/deltete conflict
Etiene Dalcol 5248a1a5 2017-11-11T15:53:18 tests: add test case for index reloads on merge Adds a test case for the issue #4203, when diverging indexes on memory and disk cause git merge to abort with GIT_ECONFLICT
Edward Thomson 49806e9b 2017-02-09T16:52:03 merge_trees: introduce test for submodule renames Test that shows that submodules are incorrectly considered in renames, and `git_merge_trees` will fail to lookup the submodule as a blob.
Edward Thomson 19ed4d0c 2017-01-01T22:19:23 merge: set default rename threshold When `GIT_MERGE_FIND_RENAMES` is set, provide a default for `rename_threshold` when it is unset.
Edward Thomson 9be638ec 2016-04-19T15:12:18 git_diff_generated: abstract generated diffs
Edward Thomson d953c450 2016-02-28T21:30:00 merge drivers: handle configured but not found driver
Edward Thomson 6d8b2cdb 2016-02-28T09:34:11 merge driver: remove `check` callback 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.
Edward Thomson 58d33126 2015-12-26T19:47:17 merge driver: tests for set and unset merge attribute 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).
Edward Thomson d3f0875a 2015-12-25T00:34:39 merge driver: tests for custom default merge drivers
Edward Thomson 7d307c1e 2015-12-23T23:52:02 merge driver: test GIT_EMERGECONFLICT When a `check` or `apply` callback function returns `GIT_EMERGECONFLICT` stop and product a conflict.
Edward Thomson 59f29314 2015-12-23T23:44:58 merge driver: test GIT_PASSTHROUGH When a `check` or `apply` callback function returns `GIT_PASSTHROUGH`, move on to the default merge driver.
Edward Thomson 3f04219f 2015-12-23T10:23:08 merge driver: introduce custom merge drivers 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.
Stan Hu 7a74590d 2015-12-03T09:57:56 Fix rebase bug and include test for merge=union
Edward Thomson 6abdf52d 2016-03-07T09:37:51 merge::workdir::dirty: update to use `st_ctime_nsec` Update unit test to use newfangled `st_ctime_nsec`, which provides indirection to the platform-correct name.
Edward Thomson 35439f59 2016-02-11T12:24:21 win32: introduce p_timeval that isn't stupid Windows defines `timeval` with `long`, which we cannot sanely cope with. Instead, use a custom timeval struct.
Edward Thomson 263e674e 2016-02-11T11:41:23 merge tests: correct casts
Edward Thomson 5b9c63c3 2015-11-20T19:01:42 recursive merge: add a recursion limit
Edward Thomson 78859c63 2015-11-20T17:33:49 merge: handle conflicts in recursive base building 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.
Edward Thomson 34a51428 2015-11-09T11:55:26 merge tests: add complex recursive example
Edward Thomson 651bfd69 2015-11-09T08:24:47 recursive: test conflict output during recursive merge
Edward Thomson dcde5720 2015-11-09T08:23:27 merge tests: move expected data into own file
Edward Thomson b1eef912 2015-10-27T18:00:30 merge: add recursive test with conflicting contents
Edward Thomson fccad82e 2015-10-27T14:23:35 merge: add recursive test with three merge bases
Edward Thomson 99d9d9a4 2015-10-26T17:44:36 merge: improve test names in recursive merge tests
Edward Thomson a200bcf7 2015-10-26T17:25:42 merge: add a third-level recursive merge
Edward Thomson cdb6c1c8 2015-10-26T17:14:28 merge: add a second-level recursive merge
Edward Thomson 86c8d02c 2015-10-22T20:20:07 merge: add simple recursive test Add a simple recursive test - where multiple ancestors exist and creating a virtual merge base from them would prevent a conflict.
Edward Thomson fa78782f 2015-10-22T17:00:09 merge: rename `git_merge_tree_flags_t` -> `git_merge_flags_t`
Carlos Martín Nieto 75a0ccf5 2015-11-12T19:53:09 Merge pull request #3170 from CmdrMoozy/nsec_fix git_index_entry__init_from_stat: set nsec fields in entry stats
Edward Thomson 8683d31f 2015-10-22T14:39:20 merge: add GIT_MERGE_TREE_FAIL_ON_CONFLICT 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.
Edward Thomson 6c014bcc 2015-09-29T12:18:17 diff: don't feed large files to xdiff
Edward Thomson e4352066 2015-09-28T18:25:24 merge_file: treat large files as binary 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.
Axel Rasmussen e9e6df2c 2015-06-15T09:28:55 cmake: Only provide USE_NSEC if struct stat members are avilable. 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.
Axel Rasmussen e7de893e 2015-06-01T13:43:54 cmake: add USE_NSEC, and only check nanosec m/ctime if enabled
Edward Thomson ed1c6446 2015-07-28T11:41:27 iterator: use an options struct instead of args
Carlos Martín Nieto f861abad 2015-07-12T19:56:19 Merge branch 'portable-zu'
Matthew Plough 768f8be3 2015-06-30T19:00:41 Fix #3094 - improve use of portable size_t/ssize_t format specifiers. 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.
Edward Thomson ae8f7260 2015-07-07T16:59:14 merge_files: don't add trailing newlines When invoked with three files that each lack a trailing newline, the merge result should also lack a trailing newline.
Carlos Martín Nieto 5b05f954 2015-06-20T13:17:06 merge: work around write-side racy protection when hacking the index 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.
Edward Thomson fef5344c 2015-06-16T16:34:25 merge::workdir::dirty: tick idx to defeat racy-git
Edward Thomson 9f545b9d 2015-05-19T11:23:59 introduce `git_index_entry_is_conflict` 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.
Edward Thomson 9ebb5a3f 2015-02-18T22:53:40 merge: merge iterators
Jacques Germishuys 13de9363 2015-03-12T12:36:09 Collapse whitespace flags into git_merge_file_flags_t
Jacques Germishuys f29dde68 2015-03-12T12:29:47 Renamed git_merge_options 'flags' to 'tree_flags'
Jacques Germishuys 0f24cac2 2015-03-09T17:03:03 Added tests to merge files and branches with whitespace problems and fixes
Carlos Martín Nieto 23a17803 2015-01-07T14:16:50 reset: remove reflog message override This function is meant to simulate what git does in the reset command, so we should include the reflog message in that.
Carlos Martín Nieto 659cf202 2015-01-07T12:23:05 Remove the signature from ref-modifying functions 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.
Edward Thomson 8b0ddd5d 2015-01-17T23:28:53 merge: lock the index at the start of the merge 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.
Edward Thomson 42f98a26 2015-01-17T23:31:24 merge test: test an actual failure, not conflict 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.
Linquize 8e0aa2eb 2014-12-07T23:41:30 Fix broken merge tests due to autocrlf was not false
Edward Thomson 18b00406 2014-10-03T19:02:29 s/git_merge_head/git_annotated_commit Rename git_merge_head to git_annotated_commit, as it becomes used in more operations than just merge.
Carlos Martín Nieto 0625638f 2014-10-10T17:40:53 Merge pull request #2499 from csware/hard-reset-checkout-callbacks Allow to propagate checkout callbacks to git HARD reset
Vicent Marti 737b5051 2014-10-01T12:03:24 hashsig: Export as a `sys` header
Jakub Čajka d99e5471 2014-06-11T09:37:15 Fixed merge REUC test for big-endian 64-bit
Ciro Santilli 3b2cb2c9 2014-09-16T11:49:25 Factor 40 and 41 constants from source.
Sven Strickroth b8add6c4 2014-08-03T15:44:13 Allow to propagate checkout callbacks to git HARD reset Signed-off-by: Sven Strickroth <email@cs-ware.de>
Vicent Marti c1bf2942 2014-07-02T15:29:25 Merge pull request #2455 from ethomson/equal_oid Introduce `cl_assert_equal_oid`
Edward Thomson 967f5a76 2014-05-23T14:50:51 git_checkout_index: checkout other indexes git_checkout_index can now check out other git_index's (that are not necessarily the repository index). This allows checkout_index to use the repository's index for stat cache information instead of the index data being checked out. git_merge and friends now check out their indexes directly instead of trying to blend it into the running index.
Edward Thomson 0cee70eb 2014-07-01T14:09:01 Introduce cl_assert_equal_oid
Edward Thomson eff531e1 2014-05-27T20:58:20 Modify GIT_MERGE_CONFIG -> GIT_MERGE_PREFERENCE
Edward Thomson a3622ba6 2014-05-16T13:54:40 Move GIT_MERGE_CONFIG_* to its own enum
Edward Thomson d362093f 2014-05-08T15:41:36 Introduce GIT_MERGE_CONFIG_* for merge.ff settings git_merge_analysis will now return GIT_MERGE_CONFIG_NO_FASTFORWARD when merge.ff=false and GIT_MERGE_CONFIG_FASTFORWARD_ONLY when merge.ff=true
Edward Thomson a4e2c36a 2014-04-23T19:40:21 merge: checkout default shouldn't clobber given
Edward Thomson 26564d80 2014-04-23T19:26:58 merge: default checkout strategy for should be SAFE
Jacques Germishuys 6fefb7af 2014-04-13T19:53:35 Capture conflict information in MERGE_MSG for revert and merge
Edward Thomson 976634c4 2014-03-30T19:56:18 Introduce git_merge_head_id
Edward Thomson 58c2b1c4 2014-03-20T09:35:22 UNBORN implies FAST_FORWARD
Edward Thomson ac584fcf 2014-03-18T16:04:51 Introduce GIT_MERGE_ANALYSIS_UNBORN
Edward Thomson 97f3462a 2014-03-18T13:14:09 git_merge_status -> git_merge_analysis
Edward Thomson d9fdee6e 2014-03-12T09:43:53 Remove `git_merge_result` as it's now unnecessary
Edward Thomson 5aa2ac6d 2014-03-11T22:47:39 Update git_merge_tree_opts to git_merge_options
Edward Thomson 02105a27 2014-03-11T18:40:38 Change signature of `git_merge` to take merge and checkout opts
Edward Thomson 1c0b6a38 2014-03-11T17:58:10 Remove fastforward / uptodate from `git_merge`
Edward Thomson ccb30827 2014-03-11T17:19:35 Add `git_merge_status` to provide info about an upcoming merge
Edward Thomson 05d47768 2014-03-10T22:30:41 Introduce git_merge_file for consumers
Ben Straub 6affd71f 2014-01-03T17:38:34 git_checkout_opts -> git_checkout_options
Ben Straub a2ce19ca 2014-02-05T13:35:26 Prevent user's merge.conflictstyle from breaking tests
Ben Straub 5c8be325 2014-02-05T13:32:45 Fix a few references to changed function signatures
Ben Straub 0de2c4e3 2014-02-05T13:15:57 Merge remote-tracking branch 'libgit2/development' into bs/more-reflog-stuff
Edward Thomson bb13d391 2014-02-01T12:51:44 Test that emulates a strange filter implementation
Edward Thomson 16eb8b7c 2014-02-01T12:02:55 Tests merging staged files identical to result
Edward Thomson b60149ec 2014-01-31T18:43:50 Tests merge when changes exist in workdir/index
Ben Straub 586be3b8 2014-02-03T15:05:55 Add reflog parameters to git_reset
Carlos Martín Nieto a1bbc0ce 2014-01-25T04:14:37 merge: rename _oid() -> id() Following the rest of the series, use 'id' when refering to the value.
Carlos Martín Nieto d541170c 2014-01-24T11:36:41 index: rename an entry's id to 'id' This was not converted when we converted the rest, so do it now.