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/CommitFilter.cs | |
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/CommitFilter.cs')
-rw-r--r-- | LibGit2Sharp/CommitFilter.cs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/LibGit2Sharp/CommitFilter.cs b/LibGit2Sharp/CommitFilter.cs index 43d26bbb..5635fc52 100644 --- a/LibGit2Sharp/CommitFilter.cs +++ b/LibGit2Sharp/CommitFilter.cs @@ -16,6 +16,7 @@ namespace LibGit2Sharp { SortBy = CommitSortStrategies.Time; Since = "HEAD"; + FirstParent = false; } /// <summary> @@ -57,6 +58,11 @@ namespace LibGit2Sharp get { return ToList(Until); } } + /// <summary> + /// Whether to limit the walk to each commit's first parent, instead of all of them + /// </summary> + public bool FirstParent { get; set; } + private static IList<object> ToList(object obj) { var list = new List<object>(); |