Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/libgit2sharp.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@microsoft.com>2015-01-16 22:37:04 +0300
committernulltoken <emeric.fermas@gmail.com>2015-01-17 11:37:08 +0300
commite2f13996e42e774292358b712324193f7f4e9596 (patch)
tree76c1f4a9e5fb547678a612f31620db33309c7c04 /LibGit2Sharp.Tests
parentdb0b052269a1ee7f12e1b1986ef4c9220c1423ec (diff)
Repository: allow Options with a bare repo
Fix a minor logic bug, where we assumed that any RepositoryOptions would provide a workdir and index such that the repo is not bare.
Diffstat (limited to 'LibGit2Sharp.Tests')
-rw-r--r--LibGit2Sharp.Tests/RepositoryOptionsFixture.cs12
1 files changed, 12 insertions, 0 deletions
diff --git a/LibGit2Sharp.Tests/RepositoryOptionsFixture.cs b/LibGit2Sharp.Tests/RepositoryOptionsFixture.cs
index eca6ff34..1d207286 100644
--- a/LibGit2Sharp.Tests/RepositoryOptionsFixture.cs
+++ b/LibGit2Sharp.Tests/RepositoryOptionsFixture.cs
@@ -53,6 +53,18 @@ namespace LibGit2Sharp.Tests
}
[Fact]
+ public void CanOpenABareRepoWithOptions()
+ {
+ var options = new RepositoryOptions { GlobalConfigurationLocation = null };
+
+ string path = SandboxBareTestRepo();
+ using (var repo = new Repository(path, options))
+ {
+ Assert.True(repo.Info.IsBare);
+ }
+ }
+
+ [Fact]
public void CanProvideADifferentWorkDirToAStandardRepo()
{
var path1 = SandboxStandardTestRepo();