Commit 85196232 by Vicent Marti

Add test case

parent 1d0bed9d
[core]
repositoryformatversion = 0
filemode = true
bare = true
logallrefupdates = true
P pack-3d944c0c5bcb6b16209af847052c6ff1a521529d.pack
# pack-refs with: peeled fully-peeled
e18fa2788e9c4e12d83150808a31dfbfb1ae364f refs/heads/master
91f4b95df4a59504a9813ba66912562931d990e3 refs/heads/ref2/ref28
...@@ -492,3 +492,22 @@ void test_revwalk_mergebase__octopus_merge_branch(void) ...@@ -492,3 +492,22 @@ void test_revwalk_mergebase__octopus_merge_branch(void)
* *
* a * a
*/ */
void test_revwalk_mergebase__remove_redundant(void)
{
git_repository *repo;
git_oid one, two, base;
git_oidarray result = {NULL, 0};
cl_git_pass(git_repository_open(&repo, cl_fixture("redundant.git")));
cl_git_pass(git_oid_fromstr(&one, "d89137c93ba1ee749214ff4ce52ae9137bc833f9"));
cl_git_pass(git_oid_fromstr(&two, "91f4b95df4a59504a9813ba66912562931d990e3"));
cl_git_pass(git_oid_fromstr(&base, "6cb1f2352d974e1c5a776093017e8772416ac97a"));
cl_git_pass(git_merge_bases(&result, repo, &one, &two));
cl_assert_equal_i(1, result.count);
cl_assert_equal_oid(&base, &result.ids[0]);
git_repository_free(repo);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment