mirror of
https://git.proxmox.com/git/libgit2
synced 2026-01-06 22:58:58 +00:00
merge: add recursive test with three merge bases
This commit is contained in:
parent
99d9d9a470
commit
fccad82ee8
@ -200,3 +200,49 @@ void test_merge_trees_recursive__three_levels_of_multiple_bases_norecursive(void
|
||||
git_index_free(index);
|
||||
}
|
||||
|
||||
void test_merge_trees_recursive__three_base_commits(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, "c4f7269b07c76d02755d75ccaf05c0b4c36cdc6c", 0, "gravy.txt" },
|
||||
{ 0100644, "68af1fc7407fd9addf1701a87eb1c95c7494c598", 0, "oyster.txt" },
|
||||
{ 0100644, "a7b066537e6be7109abfe4ff97b675d4e077da20", 0, "veal.txt" },
|
||||
};
|
||||
|
||||
cl_git_pass(merge_commits_from_branches(&index, repo, "branchE-1", "branchE-2", &opts));
|
||||
|
||||
cl_assert(merge_test_index(index, merge_index_entries, 6));
|
||||
|
||||
git_index_free(index);
|
||||
}
|
||||
|
||||
void test_merge_trees_recursive__three_base_commits_norecursive(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, "9e12bce04446d097ae1782967a5888c2e2a0d35b", 1, "gravy.txt" },
|
||||
{ 0100644, "d8dd349b78f19a4ebe3357bacb8138f00bf5ed41", 2, "gravy.txt" },
|
||||
{ 0100644, "e50fbbd701458757bdfe9815f58ed717c588d1b5", 3, "gravy.txt" },
|
||||
{ 0100644, "68af1fc7407fd9addf1701a87eb1c95c7494c598", 0, "oyster.txt" },
|
||||
{ 0100644, "a7b066537e6be7109abfe4ff97b675d4e077da20", 0, "veal.txt" },
|
||||
};
|
||||
|
||||
opts.flags |= GIT_MERGE_NO_RECURSIVE;
|
||||
|
||||
cl_git_pass(merge_commits_from_branches(&index, repo, "branchE-1", "branchE-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.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
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/branchE-1
Normal file
BIN
tests/resources/merge-recursive/.gitted/refs/heads/branchE-1
Normal file
Binary file not shown.
BIN
tests/resources/merge-recursive/.gitted/refs/heads/branchE-2
Normal file
BIN
tests/resources/merge-recursive/.gitted/refs/heads/branchE-2
Normal file
Binary file not shown.
BIN
tests/resources/merge-recursive/.gitted/refs/heads/branchE-3
Normal file
BIN
tests/resources/merge-recursive/.gitted/refs/heads/branchE-3
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user