@@ -166,40 +166,35 @@ impl<'repo> Platform<'repo> {
166
166
Ok ( revision:: Walk {
167
167
repo,
168
168
inner : Box :: new (
169
- gix_traverse:: commit:: Ancestors :: filtered (
170
- tips,
171
- gix_traverse:: commit:: ancestors:: State :: default ( ) ,
172
- & repo. objects ,
173
- {
174
- // Note that specific shallow handling for commit-graphs isn't needed as these contain
175
- // all information there is, and exclude shallow parents to be structurally consistent.
176
- let shallow_commits = repo. shallow_commits ( ) ?;
177
- let mut grafted_parents_to_skip = Vec :: new ( ) ;
178
- let mut buf = Vec :: new ( ) ;
179
- move |id| {
180
- if !filter ( id) {
181
- return false ;
182
- }
183
- match shallow_commits. as_ref ( ) {
184
- Some ( commits) => {
185
- let id = id. to_owned ( ) ;
186
- if let Ok ( idx) = grafted_parents_to_skip. binary_search ( & id) {
187
- grafted_parents_to_skip. remove ( idx) ;
188
- return false ;
189
- } ;
190
- if commits. binary_search ( & id) . is_ok ( ) {
191
- if let Ok ( commit) = repo. objects . find_commit_iter ( & id, & mut buf) {
192
- grafted_parents_to_skip. extend ( commit. parent_ids ( ) ) ;
193
- grafted_parents_to_skip. sort ( ) ;
194
- }
195
- } ;
196
- true
197
- }
198
- None => true ,
169
+ gix_traverse:: commit:: Ancestors :: filtered ( tips, & repo. objects , {
170
+ // Note that specific shallow handling for commit-graphs isn't needed as these contain
171
+ // all information there is, and exclude shallow parents to be structurally consistent.
172
+ let shallow_commits = repo. shallow_commits ( ) ?;
173
+ let mut grafted_parents_to_skip = Vec :: new ( ) ;
174
+ let mut buf = Vec :: new ( ) ;
175
+ move |id| {
176
+ if !filter ( id) {
177
+ return false ;
178
+ }
179
+ match shallow_commits. as_ref ( ) {
180
+ Some ( commits) => {
181
+ let id = id. to_owned ( ) ;
182
+ if let Ok ( idx) = grafted_parents_to_skip. binary_search ( & id) {
183
+ grafted_parents_to_skip. remove ( idx) ;
184
+ return false ;
185
+ } ;
186
+ if commits. binary_search ( & id) . is_ok ( ) {
187
+ if let Ok ( commit) = repo. objects . find_commit_iter ( & id, & mut buf) {
188
+ grafted_parents_to_skip. extend ( commit. parent_ids ( ) ) ;
189
+ grafted_parents_to_skip. sort ( ) ;
190
+ }
191
+ } ;
192
+ true
199
193
}
194
+ None => true ,
200
195
}
201
- } ,
202
- )
196
+ }
197
+ } )
203
198
. sorting ( sorting) ?
204
199
. parents ( parents)
205
200
. commit_graph (
0 commit comments