@@ -92,7 +92,7 @@ public void CanEnumerateCommitsFromSha()
9292 string path = SandboxBareTestRepo ( ) ;
9393 using ( var repo = new Repository ( path ) )
9494 {
95- foreach ( Commit commit in repo . Commits . QueryBy ( new CommitFilter { Since = "a4a7dce85cf63874e984719f4fdd239f5145052f" } ) )
95+ foreach ( Commit commit in repo . Commits . QueryBy ( new CommitFilter { IncludeReachableFrom = "a4a7dce85cf63874e984719f4fdd239f5145052f" } ) )
9696 {
9797 Assert . NotNull ( commit ) ;
9898 count ++ ;
@@ -107,9 +107,9 @@ public void QueryingTheCommitHistoryWithUnknownShaOrInvalidEntryPointThrows()
107107 string path = SandboxBareTestRepo ( ) ;
108108 using ( var repo = new Repository ( path ) )
109109 {
110- Assert . Throws < NotFoundException > ( ( ) => repo . Commits . QueryBy ( new CommitFilter { Since = Constants . UnknownSha } ) . Count ( ) ) ;
111- Assert . Throws < NotFoundException > ( ( ) => repo . Commits . QueryBy ( new CommitFilter { Since = "refs/heads/deadbeef" } ) . Count ( ) ) ;
112- Assert . Throws < ArgumentNullException > ( ( ) => repo . Commits . QueryBy ( new CommitFilter { Since = null } ) . Count ( ) ) ;
110+ Assert . Throws < NotFoundException > ( ( ) => repo . Commits . QueryBy ( new CommitFilter { IncludeReachableFrom = Constants . UnknownSha } ) . Count ( ) ) ;
111+ Assert . Throws < NotFoundException > ( ( ) => repo . Commits . QueryBy ( new CommitFilter { IncludeReachableFrom = "refs/heads/deadbeef" } ) . Count ( ) ) ;
112+ Assert . Throws < ArgumentNullException > ( ( ) => repo . Commits . QueryBy ( new CommitFilter { IncludeReachableFrom = null } ) . Count ( ) ) ;
113113 }
114114 }
115115
@@ -121,8 +121,8 @@ public void QueryingTheCommitHistoryFromACorruptedReferenceThrows()
121121 {
122122 CreateCorruptedDeadBeefHead ( repo . Info . Path ) ;
123123
124- Assert . Throws < NotFoundException > ( ( ) => repo . Commits . QueryBy ( new CommitFilter { Since = repo . Branches [ "deadbeef" ] } ) . Count ( ) ) ;
125- Assert . Throws < NotFoundException > ( ( ) => repo . Commits . QueryBy ( new CommitFilter { Since = repo . Refs [ "refs/heads/deadbeef" ] } ) . Count ( ) ) ;
124+ Assert . Throws < NotFoundException > ( ( ) => repo . Commits . QueryBy ( new CommitFilter { IncludeReachableFrom = repo . Branches [ "deadbeef" ] } ) . Count ( ) ) ;
125+ Assert . Throws < NotFoundException > ( ( ) => repo . Commits . QueryBy ( new CommitFilter { IncludeReachableFrom = repo . Refs [ "refs/heads/deadbeef" ] } ) . Count ( ) ) ;
126126 }
127127 }
128128
@@ -132,8 +132,8 @@ public void QueryingTheCommitHistoryWithBadParamsThrows()
132132 string path = SandboxBareTestRepo ( ) ;
133133 using ( var repo = new Repository ( path ) )
134134 {
135- Assert . Throws < ArgumentException > ( ( ) => repo . Commits . QueryBy ( new CommitFilter { Since = string . Empty } ) ) ;
136- Assert . Throws < ArgumentNullException > ( ( ) => repo . Commits . QueryBy ( new CommitFilter { Since = null } ) ) ;
135+ Assert . Throws < ArgumentException > ( ( ) => repo . Commits . QueryBy ( new CommitFilter { IncludeReachableFrom = string . Empty } ) ) ;
136+ Assert . Throws < ArgumentNullException > ( ( ) => repo . Commits . QueryBy ( new CommitFilter { IncludeReachableFrom = null } ) ) ;
137137 Assert . Throws < ArgumentNullException > ( ( ) => repo . Commits . QueryBy ( default ( CommitFilter ) ) ) ;
138138 }
139139 }
@@ -150,7 +150,7 @@ public void CanEnumerateCommitsWithReverseTimeSorting()
150150 {
151151 foreach ( Commit commit in repo . Commits . QueryBy ( new CommitFilter
152152 {
153- Since = "a4a7dce85cf63874e984719f4fdd239f5145052f" ,
153+ IncludeReachableFrom = "a4a7dce85cf63874e984719f4fdd239f5145052f" ,
154154 SortBy = CommitSortStrategies . Time | CommitSortStrategies . Reverse
155155 } ) )
156156 {
@@ -170,7 +170,7 @@ public void CanEnumerateCommitsWithReverseTopoSorting()
170170 {
171171 List < Commit > commits = repo . Commits . QueryBy ( new CommitFilter
172172 {
173- Since = "a4a7dce85cf63874e984719f4fdd239f5145052f" ,
173+ IncludeReachableFrom = "a4a7dce85cf63874e984719f4fdd239f5145052f" ,
174174 SortBy = CommitSortStrategies . Time | CommitSortStrategies . Reverse
175175 } ) . ToList ( ) ;
176176 foreach ( Commit commit in commits )
@@ -189,7 +189,7 @@ public void CanEnumerateCommitsWithReverseTopoSorting()
189189 public void CanSimplifyByFirstParent ( )
190190 {
191191 AssertEnumerationOfCommits (
192- repo => new CommitFilter { Since = repo . Head , FirstParentOnly = true } ,
192+ repo => new CommitFilter { IncludeReachableFrom = repo . Head , FirstParentOnly = true } ,
193193 new [ ]
194194 {
195195 "4c062a6" , "be3563a" , "9fd738e" ,
@@ -216,7 +216,7 @@ public void CanEnumerateCommitsWithTimeSorting()
216216 {
217217 foreach ( Commit commit in repo . Commits . QueryBy ( new CommitFilter
218218 {
219- Since = "a4a7dce85cf63874e984719f4fdd239f5145052f" ,
219+ IncludeReachableFrom = "a4a7dce85cf63874e984719f4fdd239f5145052f" ,
220220 SortBy = CommitSortStrategies . Time
221221 } ) )
222222 {
@@ -236,7 +236,7 @@ public void CanEnumerateCommitsWithTopoSorting()
236236 {
237237 List < Commit > commits = repo . Commits . QueryBy ( new CommitFilter
238238 {
239- Since = "a4a7dce85cf63874e984719f4fdd239f5145052f" ,
239+ IncludeReachableFrom = "a4a7dce85cf63874e984719f4fdd239f5145052f" ,
240240 SortBy = CommitSortStrategies . Topological
241241 } ) . ToList ( ) ;
242242 foreach ( Commit commit in commits )
@@ -255,7 +255,7 @@ public void CanEnumerateCommitsWithTopoSorting()
255255 public void CanEnumerateFromHead ( )
256256 {
257257 AssertEnumerationOfCommits (
258- repo => new CommitFilter { Since = repo . Head } ,
258+ repo => new CommitFilter { IncludeReachableFrom = repo . Head } ,
259259 new [ ]
260260 {
261261 "4c062a6" , "be3563a" , "c47800c" , "9fd738e" ,
@@ -277,7 +277,7 @@ public void CanEnumerateFromDetachedHead()
277277 repoClone . Checkout ( headSha ) ;
278278
279279 AssertEnumerationOfCommitsInRepo ( repoClone ,
280- repo => new CommitFilter { Since = repo . Head } ,
280+ repo => new CommitFilter { IncludeReachableFrom = repo . Head } ,
281281 new [ ]
282282 {
283283 "32eab9c" , "592d3c8" , "4c062a6" ,
@@ -291,7 +291,7 @@ public void CanEnumerateFromDetachedHead()
291291 public void CanEnumerateUsingTwoHeadsAsBoundaries ( )
292292 {
293293 AssertEnumerationOfCommits (
294- repo => new CommitFilter { Since = "HEAD" , Until = "refs/heads/br2" } ,
294+ repo => new CommitFilter { IncludeReachableFrom = "HEAD" , ExcludeReachableFrom = "refs/heads/br2" } ,
295295 new [ ] { "4c062a6" , "be3563a" }
296296 ) ;
297297 }
@@ -300,7 +300,7 @@ public void CanEnumerateUsingTwoHeadsAsBoundaries()
300300 public void CanEnumerateUsingImplicitHeadAsSinceBoundary ( )
301301 {
302302 AssertEnumerationOfCommits (
303- repo => new CommitFilter { Until = "refs/heads/br2" } ,
303+ repo => new CommitFilter { ExcludeReachableFrom = "refs/heads/br2" } ,
304304 new [ ] { "4c062a6" , "be3563a" }
305305 ) ;
306306 }
@@ -309,7 +309,7 @@ public void CanEnumerateUsingImplicitHeadAsSinceBoundary()
309309 public void CanEnumerateUsingTwoAbbreviatedShasAsBoundaries ( )
310310 {
311311 AssertEnumerationOfCommits (
312- repo => new CommitFilter { Since = "a4a7dce" , Until = "4a202b3" } ,
312+ repo => new CommitFilter { IncludeReachableFrom = "a4a7dce" , ExcludeReachableFrom = "4a202b3" } ,
313313 new [ ] { "a4a7dce" , "c47800c" , "9fd738e" }
314314 ) ;
315315 }
@@ -318,7 +318,7 @@ public void CanEnumerateUsingTwoAbbreviatedShasAsBoundaries()
318318 public void CanEnumerateCommitsFromTwoHeads ( )
319319 {
320320 AssertEnumerationOfCommits (
321- repo => new CommitFilter { Since = new [ ] { "refs/heads/br2" , "refs/heads/master" } } ,
321+ repo => new CommitFilter { IncludeReachableFrom = new [ ] { "refs/heads/br2" , "refs/heads/master" } } ,
322322 new [ ]
323323 {
324324 "4c062a6" , "a4a7dce" , "be3563a" , "c47800c" ,
@@ -330,7 +330,7 @@ public void CanEnumerateCommitsFromTwoHeads()
330330 public void CanEnumerateCommitsFromMixedStartingPoints ( )
331331 {
332332 AssertEnumerationOfCommits (
333- repo => new CommitFilter { Since = new object [ ] { repo . Branches [ "br2" ] ,
333+ repo => new CommitFilter { IncludeReachableFrom = new object [ ] { repo . Branches [ "br2" ] ,
334334 "refs/heads/master" ,
335335 new ObjectId ( "e90810b8df3e80c413d903f631643c716887138d" ) } } ,
336336 new [ ]
@@ -345,7 +345,7 @@ public void CanEnumerateCommitsFromMixedStartingPoints()
345345 public void CanEnumerateCommitsUsingGlob ( )
346346 {
347347 AssertEnumerationOfCommits (
348- repo => new CommitFilter { Since = repo . Refs . FromGlob ( "refs/heads/*" ) } ,
348+ repo => new CommitFilter { IncludeReachableFrom = repo . Refs . FromGlob ( "refs/heads/*" ) } ,
349349 new [ ]
350350 {
351351 "4c062a6" , "e90810b" , "6dcf9bf" , "a4a7dce" , "be3563a" , "c47800c" , "9fd738e" , "4a202b3" , "41bc8c6" , "5001298" , "5b5b025" , "8496071"
@@ -356,7 +356,7 @@ public void CanEnumerateCommitsUsingGlob()
356356 public void CanHideCommitsUsingGlob ( )
357357 {
358358 AssertEnumerationOfCommits (
359- repo => new CommitFilter { Since = "refs/heads/packed-test" , Until = repo . Refs . FromGlob ( "*/packed" ) } ,
359+ repo => new CommitFilter { IncludeReachableFrom = "refs/heads/packed-test" , ExcludeReachableFrom = repo . Refs . FromGlob ( "*/packed" ) } ,
360360 new [ ]
361361 {
362362 "4a202b3" , "5b5b025" , "8496071"
@@ -378,7 +378,7 @@ public void CanEnumerateCommitsFromATagAnnotation()
378378 private void CanEnumerateCommitsFromATag ( Func < Tag , object > transformer )
379379 {
380380 AssertEnumerationOfCommits (
381- repo => new CommitFilter { Since = transformer ( repo . Tags [ "test" ] ) } ,
381+ repo => new CommitFilter { IncludeReachableFrom = transformer ( repo . Tags [ "test" ] ) } ,
382382 new [ ] { "e90810b" , "6dcf9bf" , }
383383 ) ;
384384 }
@@ -389,7 +389,7 @@ public void CanEnumerateAllCommits()
389389 AssertEnumerationOfCommits (
390390 repo => new CommitFilter
391391 {
392- Since = repo . Refs . OrderBy ( r => r . CanonicalName , StringComparer . Ordinal ) ,
392+ IncludeReachableFrom = repo . Refs . OrderBy ( r => r . CanonicalName , StringComparer . Ordinal ) ,
393393 } ,
394394 new [ ]
395395 {
@@ -404,7 +404,7 @@ public void CanEnumerateAllCommits()
404404 public void CanEnumerateCommitsFromATagWhichPointsToABlob ( )
405405 {
406406 AssertEnumerationOfCommits (
407- repo => new CommitFilter { Since = repo . Tags [ "point_to_blob" ] } ,
407+ repo => new CommitFilter { IncludeReachableFrom = repo . Tags [ "point_to_blob" ] } ,
408408 new string [ ] { } ) ;
409409 }
410410
@@ -419,7 +419,7 @@ public void CanEnumerateCommitsFromATagWhichPointsToATree()
419419 Tag tag = repo . ApplyTag ( "point_to_tree" , headTreeSha ) ;
420420
421421 AssertEnumerationOfCommitsInRepo ( repo ,
422- r => new CommitFilter { Since = tag } ,
422+ r => new CommitFilter { IncludeReachableFrom = tag } ,
423423 new string [ ] { } ) ;
424424 }
425425 }
@@ -880,10 +880,10 @@ public void CanRetrieveChildrenOfASpecificCommit()
880880 var filter = new CommitFilter
881881 {
882882 /* Revwalk from all the refs (git log --all) ... */
883- Since = repo . Refs ,
883+ IncludeReachableFrom = repo . Refs ,
884884
885885 /* ... and stop when the parent is reached */
886- Until = parentSha
886+ ExcludeReachableFrom = parentSha
887887 } ;
888888
889889 var commits = repo . Commits . QueryBy ( filter ) ;
0 commit comments