9
9
namespace LibGit2Sharp
10
10
{
11
11
/// <summary>
12
- /// A collection of commits in a <see cref = "Repository" />
12
+ /// A log of commits in a <see cref = "Repository" />
13
13
/// </summary>
14
- public class CommitCollection : IQueryableCommitCollection
14
+ public class CommitLog : IQueryableCommitLog
15
15
{
16
16
private readonly Repository repo ;
17
17
private IList < object > includedIdentifier = new List < object > { "HEAD" } ;
18
18
private IList < object > excludedIdentifier = new List < object > ( ) ;
19
19
private readonly GitSortOptions sortOptions ;
20
20
21
21
/// <summary>
22
- /// Initializes a new instance of the <see cref = "CommitCollection " /> class.
22
+ /// Initializes a new instance of the <see cref = "CommitLog " /> class.
23
23
/// The commits will be enumerated according in reverse chronological order.
24
24
/// </summary>
25
25
/// <param name = "repo">The repository.</param>
26
- internal CommitCollection ( Repository repo )
26
+ internal CommitLog ( Repository repo )
27
27
: this ( repo , GitSortOptions . Time )
28
28
{
29
29
}
30
30
31
31
/// <summary>
32
- /// Initializes a new instance of the <see cref = "CommitCollection " /> class.
32
+ /// Initializes a new instance of the <see cref = "CommitLog " /> class.
33
33
/// </summary>
34
34
/// <param name = "repo">The repository.</param>
35
35
/// <param name = "sortingStrategy">The sorting strategy which should be applied when enumerating the commits.</param>
36
- internal CommitCollection ( Repository repo , GitSortOptions sortingStrategy )
36
+ internal CommitLog ( Repository repo , GitSortOptions sortingStrategy )
37
37
{
38
38
this . repo = repo ;
39
39
sortOptions = sortingStrategy ;
40
40
}
41
41
42
42
/// <summary>
43
- /// Gets the current sorting strategy applied when enumerating the collection
43
+ /// Gets the current sorting strategy applied when enumerating the log
44
44
/// </summary>
45
45
public GitSortOptions SortedBy
46
46
{
@@ -50,9 +50,9 @@ public GitSortOptions SortedBy
50
50
#region IEnumerable<Commit> Members
51
51
52
52
/// <summary>
53
- /// Returns an enumerator that iterates through the collection .
53
+ /// Returns an enumerator that iterates through the log .
54
54
/// </summary>
55
- /// <returns>An <see cref = "IEnumerator{T}" /> object that can be used to iterate through the collection .</returns>
55
+ /// <returns>An <see cref = "IEnumerator{T}" /> object that can be used to iterate through the log .</returns>
56
56
public IEnumerator < Commit > GetEnumerator ( )
57
57
{
58
58
if ( ( repo . Info . IsEmpty ) & & includedIdentifier . Any ( o => PointsAtTheHead ( o . ToString ( ) ) ) ) // TODO: ToString() == fragile
@@ -64,9 +64,9 @@ public IEnumerator<Commit> GetEnumerator()
64
64
}
65
65
66
66
/// <summary>
67
- /// Returns an enumerator that iterates through the collection .
67
+ /// Returns an enumerator that iterates through the log .
68
68
/// </summary>
69
- /// <returns>An <see cref = "IEnumerator" /> object that can be used to iterate through the collection .</returns>
69
+ /// <returns>An <see cref = "IEnumerator" /> object that can be used to iterate through the log .</returns>
70
70
IEnumerator IEnumerable . GetEnumerator ( )
71
71
{
72
72
return GetEnumerator ( ) ;
@@ -78,14 +78,14 @@ IEnumerator IEnumerable.GetEnumerator()
78
78
/// Returns the list of commits of the repository matching the specified <paramref name = "filter" />.
79
79
/// </summary>
80
80
/// <param name = "filter">The options used to control which commits will be returned.</param>
81
- /// <returns>A collection of commits, ready to be enumerated.</returns>
82
- public ICommitCollection QueryBy ( Filter filter )
81
+ /// <returns>A list of commits, ready to be enumerated.</returns>
82
+ public ICommitLog QueryBy ( Filter filter )
83
83
{
84
84
Ensure . ArgumentNotNull ( filter , "filter" ) ;
85
85
Ensure . ArgumentNotNull ( filter . Since , "filter.Since" ) ;
86
86
Ensure . ArgumentNotNullOrEmptyString ( filter . Since . ToString ( ) , "filter.Since" ) ;
87
87
88
- return new CommitCollection ( repo , filter . SortBy )
88
+ return new CommitLog ( repo , filter . SortBy )
89
89
{
90
90
includedIdentifier = ToList ( filter . Since ) ,
91
91
excludedIdentifier = ToList ( filter . Until )
0 commit comments