@@ -11,17 +11,11 @@ namespace LibGit2Sharp
11
11
/// <summary>
12
12
/// A log of commits in a <see cref="Repository"/>
13
13
/// </summary>
14
- public class CommitLog : IQueryableCommitLog
14
+ public sealed class CommitLog : IQueryableCommitLog
15
15
{
16
16
private readonly Repository repo ;
17
17
private readonly CommitFilter queryFilter ;
18
18
19
- /// <summary>
20
- /// Needed for mocking purposes.
21
- /// </summary>
22
- protected CommitLog ( )
23
- { }
24
-
25
19
/// <summary>
26
20
/// Initializes a new instance of the <see cref="CommitLog"/> class.
27
21
/// The commits will be enumerated according in reverse chronological order.
@@ -46,7 +40,7 @@ internal CommitLog(Repository repo, CommitFilter queryFilter)
46
40
/// <summary>
47
41
/// Gets the current sorting strategy applied when enumerating the log
48
42
/// </summary>
49
- public virtual CommitSortStrategies SortedBy
43
+ public CommitSortStrategies SortedBy
50
44
{
51
45
get { return queryFilter . SortBy ; }
52
46
}
@@ -57,7 +51,7 @@ public virtual CommitSortStrategies SortedBy
57
51
/// Returns an enumerator that iterates through the log.
58
52
/// </summary>
59
53
/// <returns>An <see cref="IEnumerator{T}"/> object that can be used to iterate through the log.</returns>
60
- public virtual IEnumerator < Commit > GetEnumerator ( )
54
+ public IEnumerator < Commit > GetEnumerator ( )
61
55
{
62
56
return new CommitEnumerator ( repo , queryFilter ) ;
63
57
}
@@ -78,7 +72,7 @@ IEnumerator IEnumerable.GetEnumerator()
78
72
/// </summary>
79
73
/// <param name="filter">The options used to control which commits will be returned.</param>
80
74
/// <returns>A list of commits, ready to be enumerated.</returns>
81
- public virtual ICommitLog QueryBy ( CommitFilter filter )
75
+ public ICommitLog QueryBy ( CommitFilter filter )
82
76
{
83
77
Ensure . ArgumentNotNull ( filter , "filter" ) ;
84
78
Ensure . ArgumentNotNull ( filter . Since , "filter.Since" ) ;
@@ -93,7 +87,7 @@ public virtual ICommitLog QueryBy(CommitFilter filter)
93
87
/// <param name="first">The first <see cref="Commit"/>.</param>
94
88
/// <param name="second">The second <see cref="Commit"/>.</param>
95
89
/// <returns>The common ancestor or null if none found.</returns>
96
- public virtual Commit FindCommonAncestor ( Commit first , Commit second )
90
+ public Commit FindCommonAncestor ( Commit first , Commit second )
97
91
{
98
92
Ensure . ArgumentNotNull ( first , "first" ) ;
99
93
Ensure . ArgumentNotNull ( second , "second" ) ;
@@ -108,7 +102,7 @@ public virtual Commit FindCommonAncestor(Commit first, Commit second)
108
102
/// </summary>
109
103
/// <param name="commits">The <see cref="Commit"/>s for which to find the common ancestor.</param>
110
104
/// <returns>The common ancestor or null if none found.</returns>
111
- public virtual Commit FindCommonAncestor ( IEnumerable < Commit > commits )
105
+ public Commit FindCommonAncestor ( IEnumerable < Commit > commits )
112
106
{
113
107
Ensure . ArgumentNotNull ( commits , "commits" ) ;
114
108
0 commit comments