Unified · Split
| @@ -103,17 +103,20 @@ where · 102 unmodified lines | ||
| 103 | 103 | None => Box::new({ |
| 104 | 104 | let mut progress = progress.add_child("traversing"); |
| 105 | 105 | progress.init(None, progress::count("commits")); |
| 106 | − traverse::commit::Ancestors::new( | |
| 107 | − tips.map(|t| ObjectId::from_hex(&Vec::from_os_str_lossy(t.as_ref()))) | |
| 108 | − .collect::<Result<Vec<_>, _>>()?, | |
| 109 | − traverse::commit::ancestors::State::default(), | |
| 110 | − { | |
| 111 | − let db = Arc::clone(&db); | |
| 112 | − move |oid, buf| db.find_existing_commit_iter(oid, buf, &mut pack::cache::Never).ok() | |
| 113 | − }, | |
| 106 | + interrupt::Iter::new( | |
| 107 | + traverse::commit::Ancestors::new( | |
| 108 | + tips.map(|t| ObjectId::from_hex(&Vec::from_os_str_lossy(t.as_ref()))) | |
| 109 | + .collect::<Result<Vec<_>, _>>()?, | |
| 110 | + traverse::commit::ancestors::State::default(), | |
| 111 | + { | |
| 112 | + let db = Arc::clone(&db); | |
| 113 | + move |oid, buf| db.find_existing_commit_iter(oid, buf, &mut pack::cache::Never).ok() | |
| 114 | + }, | |
| 115 | + ) | |
| 116 | + .inspect(move |_| progress.inc()), | |
| 117 | + make_cancellation_err, | |
| 114 | 118 | ) |
| 115 | − .inspect(move |_| progress.inc()) | |
| 116 | − .collect::<Result<Vec<_>, _>>()? | |
| 119 | + .collect::<Result<Result<Vec<_>, _>, _>>()?? | |
| 117 | 120 | .into_iter() |
| 118 | 121 | }), |
| 119 | 122 | Some(input) => Box::new(input.lines().filter_map(|hex_id| { |