Add test case

This commit is contained in:
Vicent Marti 2015-10-30 18:32:34 +01:00
parent 1d0bed9de1
commit 85196232e8
8 changed files with 19 additions and 0 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -492,3 +492,22 @@ void test_revwalk_mergebase__octopus_merge_branch(void)
*
* 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);
}