libgit2/libgit2sharp — pull request #692 by nulltoken (2014-04-26 13:11:54+00:00)
Title: Can't commit on a bare repository

Could somebody review whether the following test case correct?

```c#
[Fact]
public void CanCommitOnBareRepository()
{
string repoPath = InitNewRepository(true);
SelfCleaningDirectory scd = BuildSelfCleaningDirectory();
string workPath = Path.Combine(scd.RootedDirectoryPath, "work");
Directory.CreateDirectory(workPath);

RepositoryOptions repositoryOptions = new RepositoryOptions()
{
WorkingDirectoryPath = workPath,
IndexPath = Path.Combine(scd.RootedDirectoryPath, "index")
}

using (var repo = new Repository(repoPath, repositoryOptions))
{
const string relativeFilepath = "test.txt";
Touch(repo.Info.WorkingDirectory, relativeFilepath, "test\n");
repo.Index.Stage(relativeFilepath);

Assert.NotNull(repo.Commit("Initial commit", Constants.Signature, Constants.Signature));
Assert.Equal(1, repo.Head.Commits.Count());
Assert.Equal(1, repo.Commits.Count());
}
}
```