Showing the changes to git-commitgraph/tests/commitgraph.rs (1 of 60 files). Show all
Unified · Split
| @@ -1,5 +1,4 @@ | ||
| 1 | 1 | use git_commitgraph::{graph::Position as GraphPosition, Graph}; |
| 2 | −use git_object::{borrowed, owned}; | |
| 3 | 2 | use std::{ |
| 4 | 3 | collections::{HashMap, HashSet}, |
| 5 | 4 | convert::{TryFrom, TryInto}, |
| @@ -76,15 +75,15 @@ pub fn fixture_path(path: &str) -> PathBuf { · 70 unmodified lines | ||
| 76 | 75 | PathBuf::from("tests").join("fixtures").join(path) |
| 77 | 76 | } |
| 78 | 77 | |
| 79 | −pub fn hex_to_id(hex: &[u8]) -> owned::Id { | |
| 80 | − owned::Id::from_40_bytes_in_hex(hex).expect("40 bytes hex") | |
| 78 | +pub fn hex_to_id(hex: &[u8]) -> git_hash::Id { | |
| 79 | + git_hash::Id::from_40_bytes_in_hex(hex).expect("40 bytes hex") | |
| 81 | 80 | } |
| 82 | 81 | |
| 83 | 82 | pub struct RefInfo { |
| 84 | − id: owned::Id, | |
| 85 | − parent_ids: Vec<owned::Id>, | |
| 83 | + id: git_hash::Id, | |
| 84 | + parent_ids: Vec<git_hash::Id>, | |
| 86 | 85 | pos: GraphPosition, |
| 87 | − root_tree_id: owned::Id, | |
| 86 | + root_tree_id: git_hash::Id, | |
| 88 | 87 | } |
| 89 | 88 | |
| 90 | 89 | impl RefInfo { |
| @@ -125,11 +124,11 @@ pub fn inspect_refs(repo_dir: impl AsRef<Path>, refs: &[&'static str]) -> HashMa · 34 unmodified lines | ||
| 125 | 124 | let parts = x.trim_end().split(' ').collect::<Vec<_>>(); |
| 126 | 125 | ( |
| 127 | 126 | parts[0].to_string(), |
| 128 | − owned::Id::from_40_bytes_in_hex(parts[1].as_bytes()).expect("40 bytes hex"), | |
| 129 | − owned::Id::from_40_bytes_in_hex(parts[2].as_bytes()).expect("40 bytes hex"), | |
| 127 | + git_hash::Id::from_40_bytes_in_hex(parts[1].as_bytes()).expect("40 bytes hex"), | |
| 128 | + git_hash::Id::from_40_bytes_in_hex(parts[2].as_bytes()).expect("40 bytes hex"), | |
| 130 | 129 | parts[3..] |
| 131 | 130 | .iter() |
| 132 | − .map(|x| owned::Id::from_40_bytes_in_hex(x.as_bytes()).expect("40 bytes hex")) | |
| 131 | + .map(|x| git_hash::Id::from_40_bytes_in_hex(x.as_bytes()).expect("40 bytes hex")) | |
| 133 | 132 | .collect(), |
| 134 | 133 | ) |
| 135 | 134 | }) |