Commit b337814e by Scott J. Goldman

Fix no_common_ancestor test for ahead_behind count

Ahead-behind count is still a valid operation, even if the two
commits don't have a common merge-base. The old implementation was
buggy, so it returned ENOTFOUND. Fixed now.
parent 9c2a4e8c
......@@ -115,10 +115,9 @@ void test_revwalk_mergebase__no_common_ancestor_returns_ENOTFOUND(void)
cl_assert_equal_i(GIT_ENOTFOUND, error);
cl_git_fail(git_graph_ahead_behind(&ahead, &behind, _repo, &one, &two));
cl_git_fail(error);
cl_assert_equal_i(GIT_ENOTFOUND, error);
cl_git_pass(git_graph_ahead_behind(&ahead, &behind, _repo, &one, &two));
cl_assert_equal_i(2, ahead);
cl_assert_equal_i(4, behind);
}
void test_revwalk_mergebase__no_off_by_one_missing(void)
......
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