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());
    }
}
```