mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-03 14:12:22 +00:00
merge: add recursive test with conflicting contents
This commit is contained in:
parent
1b82f7b6a2
commit
b1eef912cf
@ -246,3 +246,26 @@ void test_merge_trees_recursive__three_base_commits_norecursive(void)
|
|||||||
git_index_free(index);
|
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);
|
||||||
|
}
|
||||||
|
|
||||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
tests/resources/merge-recursive/.gitted/refs/heads/branchF-1
Normal file
BIN
tests/resources/merge-recursive/.gitted/refs/heads/branchF-1
Normal file
Binary file not shown.
BIN
tests/resources/merge-recursive/.gitted/refs/heads/branchF-2
Normal file
BIN
tests/resources/merge-recursive/.gitted/refs/heads/branchF-2
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user