mirror of
				https://git.proxmox.com/git/libgit2
				synced 2025-11-04 10:33:00 +00:00 
			
		
		
		
	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.
This commit is contained in:
		
							parent
							
								
									9c2a4e8c47
								
							
						
					
					
						commit
						b337814e70
					
				@ -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)
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user