diff options
author | Edward Thomson <ethomson@edwardthomson.com> | 2015-10-28 02:00:30 +0300 |
---|---|---|
committer | Edward Thomson <ethomson@microsoft.com> | 2015-11-25 23:37:51 +0300 |
commit | b1eef912cffb9e3ce9792b6aee816c1a45c85fb0 (patch) | |
tree | b6226cd31171a626f45ca5a290bd34ab92871605 | |
parent | 1b82f7b6a218080df8ff292ab12de744226a9979 (diff) |
merge: add recursive test with conflicting contents
9 files changed, 32 insertions, 0 deletions
diff --git a/tests/merge/trees/recursive.c b/tests/merge/trees/recursive.c index 46effa5c2..abca01727 100644 --- a/tests/merge/trees/recursive.c +++ b/tests/merge/trees/recursive.c @@ -246,3 +246,26 @@ void test_merge_trees_recursive__three_base_commits_norecursive(void) git_index_free(index); } +void test_merge_trees_recursive__conflict(void) +{ + git_index *index; + git_merge_options opts = GIT_MERGE_OPTIONS_INIT; + + struct merge_index_entry merge_index_entries[] = { + { 0100644, "ffb36e513f5fdf8a6ba850a20142676a2ac4807d", 0, "asparagus.txt" }, + { 0100644, "68f6182f4c85d39e1309d97c7e456156dc9c0096", 0, "beef.txt" }, + { 0100644, "4b7c5650008b2e747fe1809eeb5a1dde0e80850a", 0, "bouilli.txt" }, + { 0100644, "c4e6cca3ec6ae0148ed231f97257df8c311e015f", 0, "gravy.txt" }, + { 0100644, "68af1fc7407fd9addf1701a87eb1c95c7494c598", 0, "oyster.txt" }, + { 0100644, "fa567f568ed72157c0c617438d077695b99d9aac", 1, "veal.txt" }, + { 0100644, "21950d5e4e4d1a871b4dfcf72ecb6b9c162c434e", 2, "veal.txt" }, + { 0100644, "3855170cef875708da06ab9ad7fc6a73b531cda1", 3, "veal.txt" }, + }; + + cl_git_pass(merge_commits_from_branches(&index, repo, "branchF-1", "branchF-2", &opts)); + + cl_assert(merge_test_index(index, merge_index_entries, 8)); + + git_index_free(index); +} + diff --git a/tests/resources/merge-recursive/.gitted/objects/21/950d5e4e4d1a871b4dfcf72ecb6b9c162c434e b/tests/resources/merge-recursive/.gitted/objects/21/950d5e4e4d1a871b4dfcf72ecb6b9c162c434e Binary files differnew file mode 100644 index 000000000..a87732611 --- /dev/null +++ b/tests/resources/merge-recursive/.gitted/objects/21/950d5e4e4d1a871b4dfcf72ecb6b9c162c434e diff --git a/tests/resources/merge-recursive/.gitted/objects/38/55170cef875708da06ab9ad7fc6a73b531cda1 b/tests/resources/merge-recursive/.gitted/objects/38/55170cef875708da06ab9ad7fc6a73b531cda1 Binary files differnew file mode 100644 index 000000000..7da945e6f --- /dev/null +++ b/tests/resources/merge-recursive/.gitted/objects/38/55170cef875708da06ab9ad7fc6a73b531cda1 diff --git a/tests/resources/merge-recursive/.gitted/objects/5b/8e1e56cb99e8b99ac22eec8aebf6422ecd08c0 b/tests/resources/merge-recursive/.gitted/objects/5b/8e1e56cb99e8b99ac22eec8aebf6422ecd08c0 Binary files differnew file mode 100644 index 000000000..c3e6d31ca --- /dev/null +++ b/tests/resources/merge-recursive/.gitted/objects/5b/8e1e56cb99e8b99ac22eec8aebf6422ecd08c0 diff --git a/tests/resources/merge-recursive/.gitted/objects/78/3d6539dde96b8873c5b5da3e79cc14cd64830b b/tests/resources/merge-recursive/.gitted/objects/78/3d6539dde96b8873c5b5da3e79cc14cd64830b new file mode 100644 index 000000000..e2f34d6bb --- /dev/null +++ b/tests/resources/merge-recursive/.gitted/objects/78/3d6539dde96b8873c5b5da3e79cc14cd64830b @@ -0,0 +1,4 @@ +xk +0S*y4/DO6ٍ-Fj[ofrvrf(G"IAq\H,٢r1%Xt R +Z6g'zBp3xuos\=18#tJ)Vmg8ֹ +L8wZU
\ No newline at end of file diff --git a/tests/resources/merge-recursive/.gitted/objects/ca/7d316d6d9af99d2481e980d68b77e572d80fe7 b/tests/resources/merge-recursive/.gitted/objects/ca/7d316d6d9af99d2481e980d68b77e572d80fe7 Binary files differnew file mode 100644 index 000000000..0733fa232 --- /dev/null +++ b/tests/resources/merge-recursive/.gitted/objects/ca/7d316d6d9af99d2481e980d68b77e572d80fe7 diff --git a/tests/resources/merge-recursive/.gitted/objects/ef/1783444b61a8671beea4ce1f4d0202677dfbfb b/tests/resources/merge-recursive/.gitted/objects/ef/1783444b61a8671beea4ce1f4d0202677dfbfb new file mode 100644 index 000000000..67e6e8a5e --- /dev/null +++ b/tests/resources/merge-recursive/.gitted/objects/ef/1783444b61a8671beea4ce1f4d0202677dfbfb @@ -0,0 +1,3 @@ +xO[ +0;TI "l-Fj3Pr+(+7ue~0bxL4A;TpJDŽcZqd#FmDkdGg +5e*Qqs?৶=1Vmc+Y#eI9yv5 70U
\ No newline at end of file diff --git a/tests/resources/merge-recursive/.gitted/refs/heads/branchF-1 b/tests/resources/merge-recursive/.gitted/refs/heads/branchF-1 new file mode 100644 index 000000000..5f2ca915b --- /dev/null +++ b/tests/resources/merge-recursive/.gitted/refs/heads/branchF-1 @@ -0,0 +1 @@ +783d6539dde96b8873c5b5da3e79cc14cd64830b diff --git a/tests/resources/merge-recursive/.gitted/refs/heads/branchF-2 b/tests/resources/merge-recursive/.gitted/refs/heads/branchF-2 new file mode 100644 index 000000000..abe2ea947 --- /dev/null +++ b/tests/resources/merge-recursive/.gitted/refs/heads/branchF-2 @@ -0,0 +1 @@ +ef1783444b61a8671beea4ce1f4d0202677dfbfb |