public void FindCommonAncestorForCommitsAsEnumerableThrows(string[] shas, MergeBaseFindingStrategy strategy)
        {
            using (var repo = new Repository(BareTestRepoPath))
            {
                var commits = shas.Select(sha => sha == "-" ? CreateOrphanedCommit(repo) : repo.Lookup<Commit>(sha)).ToArray();

                Assert.Throws<ArgumentException>(() => repo.Commits.FindMergeBase(commits, strategy));
            }
        }
        public void FindCommonAncestorForCommitsAsEnumerable(string result, string[] shas, MergeBaseFindingStrategy strategy)
        {
            using (var repo = new Repository(BareTestRepoPath))
            {
                var commits = shas.Select(sha => sha == "-" ? CreateOrphanedCommit(repo) : repo.Lookup<Commit>(sha)).ToArray();

                Commit ancestor = repo.Commits.FindMergeBase(commits, strategy);

                if (result == null)
                {
                    Assert.Null(ancestor);
                }
                else
                {
                    Assert.NotNull(ancestor);
                    Assert.Equal(result, ancestor.Id.Sha);
                }
            }
        }
 public Commit FindMergeBase(IEnumerable<Commit> commits, MergeBaseFindingStrategy strategy)
 {
     throw new NotImplementedException();
 }