diff options
author | Carlos MartÃn Nieto <cmn@dwim.me> | 2013-12-10 19:56:39 +0400 |
---|---|---|
committer | nulltoken <emeric.fermas@gmail.com> | 2013-12-11 20:53:58 +0400 |
commit | 01d105c7b8f479bb99556ae814dfd8e9dacb571f (patch) | |
tree | 704e8c296bb86564b7809da6d10eb592e2c5ea9a /LibGit2Sharp.Tests | |
parent | 137488499d3487e89281a39eede28eda2387e7ee (diff) |
CommitFilter: add simplify-by-first-parent option
Now that this is doable directly inside the revision walker, let's
expose it as a possible filter option.
This fixes #258.
Diffstat (limited to 'LibGit2Sharp.Tests')
-rw-r--r-- | LibGit2Sharp.Tests/CommitFixture.cs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/LibGit2Sharp.Tests/CommitFixture.cs b/LibGit2Sharp.Tests/CommitFixture.cs index fc5cc373..33a781eb 100644 --- a/LibGit2Sharp.Tests/CommitFixture.cs +++ b/LibGit2Sharp.Tests/CommitFixture.cs @@ -177,6 +177,18 @@ namespace LibGit2Sharp.Tests } [Fact] + public void CanSimplifyByFirstParent() + { + AssertEnumerationOfCommits( + repo => new CommitFilter { Since = repo.Head, FirstParent = true }, + new[] + { + "4c062a6", "be3563a", "9fd738e", + "4a202b3", "5b5b025", "8496071", + }); + } + + [Fact] public void CanGetParentsCount() { using (var repo = new Repository(BareTestRepoPath)) |