Skip to content

Commit b722947

Browse files
author
Jeremy Koritzinsky
committed
Updated CanRevertInObjectDatabase to not use a checkout and to just use commit refs.
1 parent 098b62a commit b722947

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

LibGit2Sharp.Tests/RevertFixture.cs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -518,14 +518,8 @@ public void CanRevertInObjectDatabase()
518518
string path = SandboxRevertTestRepo();
519519
using (var repo = new Repository(path))
520520
{
521-
522-
523-
// Checkout the revert branch.
524-
Branch branch = Commands.Checkout(repo, revertBranchName);
525-
Assert.NotNull(branch);
526-
527521
// Revert tip commit.
528-
var result = repo.ObjectDatabase.RevertCommit(repo.Head.Tip, repo.Head.Tip, 0, null);
522+
var result = repo.ObjectDatabase.RevertCommit(repo.Branches[revertBranchName].Tip, repo.Branches[revertBranchName].Tip, 0, null);
529523
Assert.Equal(MergeTreeStatus.Succeeded, result.Status);
530524
}
531525
}

0 commit comments

Comments
 (0)