diff options
author | Jameson Miller <jamill@microsoft.com> | 2012-11-05 21:04:29 +0400 |
---|---|---|
committer | nulltoken <emeric.fermas@gmail.com> | 2012-11-09 01:50:00 +0400 |
commit | a66d8ff7c0820aaacac63a5b2761facd7df7fee3 (patch) | |
tree | d15cc94462c78ca4f443f38bd03f0d84aafd7748 /LibGit2Sharp.Tests/CommitFixture.cs | |
parent | c05fc29aee3180aa3723f195c5c7e9a1f5f13037 (diff) |
Checkout is not allowed in a bare repository
Diffstat (limited to 'LibGit2Sharp.Tests/CommitFixture.cs')
-rw-r--r-- | LibGit2Sharp.Tests/CommitFixture.cs | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/LibGit2Sharp.Tests/CommitFixture.cs b/LibGit2Sharp.Tests/CommitFixture.cs index edca0aa6..757dca6f 100644 --- a/LibGit2Sharp.Tests/CommitFixture.cs +++ b/LibGit2Sharp.Tests/CommitFixture.cs @@ -25,15 +25,16 @@ namespace LibGit2Sharp.Tests [Fact] public void CanCorrectlyCountCommitsWhenSwitchingToAnotherBranch() { - using (var repo = new Repository(BareTestRepoPath)) + TemporaryCloneOfTestRepo path = BuildTemporaryCloneOfTestRepo(StandardTestRepoWorkingDirPath); + using (var repo = new Repository(path.RepositoryPath)) { repo.Checkout("test"); Assert.Equal(2, repo.Commits.Count()); Assert.Equal("e90810b8df3e80c413d903f631643c716887138d", repo.Commits.First().Id.Sha); repo.Checkout("master"); - Assert.Equal(7, repo.Commits.Count()); - Assert.Equal("4c062a6361ae6959e06292c1fa5e2822d9c96345", repo.Commits.First().Id.Sha); + Assert.Equal(9, repo.Commits.Count()); + Assert.Equal("32eab9cb1f450b5fe7ab663462b77d7f4b703344", repo.Commits.First().Id.Sha); } } @@ -221,7 +222,7 @@ namespace LibGit2Sharp.Tests [Fact] public void CanEnumerateFromDetachedHead() { - TemporaryCloneOfTestRepo path = BuildTemporaryCloneOfTestRepo(); + TemporaryCloneOfTestRepo path = BuildTemporaryCloneOfTestRepo(StandardTestRepoWorkingDirPath); using (var repoClone = new Repository(path.RepositoryPath)) { string headSha = repoClone.Head.Tip.Sha; @@ -231,7 +232,8 @@ namespace LibGit2Sharp.Tests repo => new Filter { Since = repo.Head }, new[] { - "4c062a6", "be3563a", "c47800c", "9fd738e", + "32eab9c", "592d3c8", "4c062a6", + "be3563a", "c47800c", "9fd738e", "4a202b3", "5b5b025", "8496071", }); } |