diff options
author | Saaman <romain.magny@gmail.com> | 2013-05-15 00:22:20 +0400 |
---|---|---|
committer | Saaman <romain.magny@gmail.com> | 2013-05-23 19:09:26 +0400 |
commit | e210b9bd017aa62f513c7ac7d372baeb25c2dcfa (patch) | |
tree | 98faa834a40648fc0a679852bdf1013703e64b78 /LibGit2Sharp.Tests/ResetIndexFixture.cs | |
parent | 7eba13d90f0f19477db4018cb675367c09afd6bf (diff) |
Teach Repository.Reset to append to the Reflog
Diffstat (limited to 'LibGit2Sharp.Tests/ResetIndexFixture.cs')
-rw-r--r-- | LibGit2Sharp.Tests/ResetIndexFixture.cs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/LibGit2Sharp.Tests/ResetIndexFixture.cs b/LibGit2Sharp.Tests/ResetIndexFixture.cs index 8b3a1e2f..b9903b57 100644 --- a/LibGit2Sharp.Tests/ResetIndexFixture.cs +++ b/LibGit2Sharp.Tests/ResetIndexFixture.cs @@ -67,10 +67,15 @@ namespace LibGit2Sharp.Tests RepositoryStatus oldStatus = repo.Index.RetrieveStatus(); Assert.Equal(3, oldStatus.Where(IsStaged).Count()); + var reflogEntriesCount = repo.Refs.Log(repo.Refs.Head).Count(); + repo.Reset(); RepositoryStatus newStatus = repo.Index.RetrieveStatus(); Assert.Equal(0, newStatus.Where(IsStaged).Count()); + + // Assert that no reflog entry is created + Assert.Equal(reflogEntriesCount, repo.Refs.Log(repo.Refs.Head).Count()); } } |