@@ -155,7 +155,7 @@ pub struct Platform<'repo> {
155
155
/// The owning repository.
156
156
pub repo : & ' repo Repository ,
157
157
pub ( crate ) tips : Vec < ObjectId > ,
158
- pub ( crate ) prune : Vec < ObjectId > ,
158
+ pub ( crate ) boundary : Vec < ObjectId > ,
159
159
pub ( crate ) sorting : Sorting ,
160
160
pub ( crate ) parents : gix_traverse:: commit:: Parents ,
161
161
pub ( crate ) use_commit_graph : Option < bool > ,
@@ -171,7 +171,7 @@ impl<'repo> Platform<'repo> {
171
171
parents : Default :: default ( ) ,
172
172
use_commit_graph : None ,
173
173
commit_graph : None ,
174
- prune : Vec :: new ( ) ,
174
+ boundary : Vec :: new ( ) ,
175
175
}
176
176
}
177
177
}
@@ -210,29 +210,30 @@ impl Platform<'_> {
210
210
self
211
211
}
212
212
213
- /// Prune the commit with the given `ids` such that they won't be returned, and such that none of their ancestors is returned either.
214
- ///
215
- /// Note that this forces the [sorting](Self::sorting) to
216
- /// [`ByCommitTimeCutoff`](Sorting::ByCommitTimeCutoff) configured with
217
- /// the oldest available commit time, ensuring that no commits older than the oldest of `ids` will be returned either.
213
+ /// Don't cross the given `ids` during traversal.
218
214
///
215
+ /// Note that this forces the [sorting](Self::sorting()) to [`ByCommitTimeCutoff`](Sorting::ByCommitTimeCutoff)
216
+ /// configured with the oldest available commit time, ensuring that no commits older than the oldest of `ids` will be returned either.
219
217
/// Also note that commits that can't be accessed or are missing are simply ignored for the purpose of obtaining the cutoff date.
220
- #[ doc( alias = "hide" , alias = "git2" ) ]
221
- pub fn with_pruned ( mut self , ids : impl IntoIterator < Item = impl Into < ObjectId > > ) -> Self {
218
+ ///
219
+ /// A boundary is distinctly different from exclusive refsepcs `^branch-to-not-list` in Git log.
220
+ ///
221
+ /// If this is not desired, [set the sorting](Self::sorting()) to something else right after this call.
222
+ pub fn with_boundary ( mut self , ids : impl IntoIterator < Item = impl Into < ObjectId > > ) -> Self {
222
223
let ( mut cutoff, order) = match self . sorting {
223
224
Sorting :: ByCommitTimeCutoff { seconds, order } => ( Some ( seconds) , order) ,
224
225
Sorting :: ByCommitTime ( order) => ( None , order) ,
225
226
Sorting :: BreadthFirst => ( None , CommitTimeOrder :: default ( ) ) ,
226
227
} ;
227
228
for id in ids. into_iter ( ) {
228
229
let id = id. into ( ) ;
229
- if !self . prune . contains ( & id) {
230
+ if !self . boundary . contains ( & id) {
230
231
if let Some ( time) = self . repo . find_commit ( id) . ok ( ) . and_then ( |c| c. time ( ) . ok ( ) ) {
231
232
if cutoff. is_none ( ) || cutoff > Some ( time. seconds ) {
232
233
cutoff = time. seconds . into ( ) ;
233
234
}
234
235
}
235
- self . prune . push ( id) ;
236
+ self . boundary . push ( id) ;
236
237
}
237
238
}
238
239
@@ -260,9 +261,9 @@ impl<'repo> Platform<'repo> {
260
261
parents,
261
262
use_commit_graph,
262
263
commit_graph,
263
- mut prune ,
264
+ mut boundary ,
264
265
} = self ;
265
- prune . sort ( ) ;
266
+ boundary . sort ( ) ;
266
267
Ok ( revision:: Walk {
267
268
repo,
268
269
inner : Box :: new (
@@ -277,7 +278,7 @@ impl<'repo> Platform<'repo> {
277
278
return false ;
278
279
}
279
280
let id = id. to_owned ( ) ;
280
- if prune . binary_search ( & id) . is_ok ( ) {
281
+ if boundary . binary_search ( & id) . is_ok ( ) {
281
282
return false ;
282
283
}
283
284
match shallow_commits. as_ref ( ) {
0 commit comments