Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/libgit2sharp.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarlos Martín Nieto <cmn@dwim.me>2013-12-10 19:56:39 +0400
committernulltoken <emeric.fermas@gmail.com>2013-12-11 20:53:58 +0400
commit01d105c7b8f479bb99556ae814dfd8e9dacb571f (patch)
tree704e8c296bb86564b7809da6d10eb592e2c5ea9a /LibGit2Sharp/CommitFilter.cs
parent137488499d3487e89281a39eede28eda2387e7ee (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.cs6
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>();