Showing the changes to git-diff (1 of 18 files). Show all
Unified · Split
| @@ -24,7 +24,7 @@ mod changes { · 23 unmodified lines | ||
| 24 | 24 | buf: &'a mut Vec<u8>, |
| 25 | 25 | ) -> crate::Result<TreeRefIter<'a>> { |
| 26 | 26 | let tree_id = db |
| 27 | − .find(commit, buf, &mut pack::cache::Never)? | |
| 27 | + .try_find(commit, buf, &mut pack::cache::Never)? | |
| 28 | 28 | .ok_or_else(|| format!("start commit {:?} to be present", commit))? |
| 29 | 29 | .decode()? |
| 30 | 30 | .into_commit() |
| @@ -32,7 +32,7 @@ mod changes { · 1 unmodified line | ||
| 32 | 32 | .tree(); |
| 33 | 33 | |
| 34 | 34 | Ok(db |
| 35 | − .find(tree_id, buf, &mut pack::cache::Never)? | |
| 35 | + .try_find(tree_id, buf, &mut pack::cache::Never)? | |
| 36 | 36 | .expect("main tree present") |
| 37 | 37 | .into_tree_iter() |
| 38 | 38 | .expect("id to be a tree")) |
| @@ -50,7 +50,7 @@ mod changes { · 11 unmodified lines | ||
| 50 | 50 | rhs_tree, |
| 51 | 51 | git_diff::tree::State::default(), |
| 52 | 52 | |oid, buf| { |
| 53 | − db.find(oid, buf, &mut pack::cache::Never) | |
| 53 | + db.try_find(oid, buf, &mut pack::cache::Never) | |
| 54 | 54 | .ok() |
| 55 | 55 | .flatten() |
| 56 | 56 | .and_then(|obj| obj.into_tree_iter()) |
| @@ -64,7 +64,7 @@ mod changes { · 7 unmodified lines | ||
| 64 | 64 | let mut buf = Vec::new(); |
| 65 | 65 | let (main_tree_id, parent_commit_id) = { |
| 66 | 66 | let commit = db |
| 67 | − .find(commit_id, &mut buf, &mut pack::cache::Never)? | |
| 67 | + .try_find(commit_id, &mut buf, &mut pack::cache::Never)? | |
| 68 | 68 | .ok_or_else(|| format!("start commit {:?} to be present", commit_id))? |
| 69 | 69 | .decode()? |
| 70 | 70 | .into_commit() |
| @@ -76,18 +76,18 @@ mod changes { · 5 unmodified lines | ||
| 76 | 76 | }) |
| 77 | 77 | }; |
| 78 | 78 | let current_tree = db |
| 79 | − .find(main_tree_id, &mut buf, &mut pack::cache::Never)? | |
| 79 | + .try_find(main_tree_id, &mut buf, &mut pack::cache::Never)? | |
| 80 | 80 | .expect("main tree present") |
| 81 | 81 | .into_tree_iter() |
| 82 | 82 | .expect("id to be a tree"); |
| 83 | 83 | let mut buf2 = Vec::new(); |
| 84 | 84 | let previous_tree: Option<_> = { |
| 85 | 85 | parent_commit_id |
| 86 | − .and_then(|id| db.find(id, &mut buf2, &mut pack::cache::Never).ok().flatten()) | |
| 86 | + .and_then(|id| db.try_find(id, &mut buf2, &mut pack::cache::Never).ok().flatten()) | |
| 87 | 87 | .and_then(|c| c.decode().ok()) |
| 88 | 88 | .and_then(|c| c.into_commit()) |
| 89 | 89 | .map(|c| c.tree()) |
| 90 | − .and_then(|tree| db.find(tree, &mut buf2, &mut pack::cache::Never).ok().flatten()) | |
| 90 | + .and_then(|tree| db.try_find(tree, &mut buf2, &mut pack::cache::Never).ok().flatten()) | |
| 91 | 91 | .and_then(|tree| tree.into_tree_iter()) |
| 92 | 92 | }; |
| 93 | 93 | |
| @@ -96,7 +96,7 @@ mod changes { · 2 unmodified lines | ||
| 96 | 96 | current_tree, |
| 97 | 97 | &mut git_diff::tree::State::default(), |
| 98 | 98 | |oid, buf| { |
| 99 | − db.find(oid, buf, &mut pack::cache::Never) | |
| 99 | + db.try_find(oid, buf, &mut pack::cache::Never) | |
| 100 | 100 | .ok() |
| 101 | 101 | .flatten() |
| 102 | 102 | .and_then(|obj| obj.into_tree_iter()) |
| @@ -130,7 +130,7 @@ mod changes { · 27 unmodified lines | ||
| 130 | 130 | |
| 131 | 131 | let head = head_of(db); |
| 132 | 132 | commit::Ancestors::new(Some(head), commit::ancestors::State::default(), |oid, buf| { |
| 133 | − db.find(oid, buf, &mut pack::cache::Never) | |
| 133 | + db.try_find(oid, buf, &mut pack::cache::Never) | |
| 134 | 134 | .ok() |
| 135 | 135 | .flatten() |
| 136 | 136 | .and_then(|o| o.into_commit_iter()) |