History

Make ObjectId/oid happen! (#63)

Sebastian Thiel committed 5 years ago

Commit ca78d151 parent b3fc36551 files · +216 −209Browse files

Showing the changes to git-commitgraph/tests/commitgraph.rs (1 of 51 files). Show all

Unified · Split

git-commitgraph/tests/commitgraph.rs+8−8
@@ -75,15 +75,15 @@ pub fn fixture_path(path: &str) -> PathBuf { · 74 unmodified lines
7575 PathBuf::from("tests").join("fixtures").join(path)
7676 }
7777
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")
78+pub fn hex_to_id(hex: &[u8]) -> git_hash::ObjectId {
79+ git_hash::ObjectId::from_40_bytes_in_hex(hex).expect("40 bytes hex")
8080 }
8181
8282 pub struct RefInfo {
83− id: git_hash::Id,
84− parent_ids: Vec<git_hash::Id>,
83+ id: git_hash::ObjectId,
84+ parent_ids: Vec<git_hash::ObjectId>,
8585 pos: GraphPosition,
86− root_tree_id: git_hash::Id,
86+ root_tree_id: git_hash::ObjectId,
8787 }
8888
8989 impl RefInfo {
@@ -124,11 +124,11 @@ pub fn inspect_refs(repo_dir: impl AsRef<Path>, refs: &[&'static str]) -> HashMa · 34 unmodified lines
124124 let parts = x.trim_end().split(' ').collect::<Vec<_>>();
125125 (
126126 parts[0].to_string(),
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"),
127+ git_hash::ObjectId::from_40_bytes_in_hex(parts[1].as_bytes()).expect("40 bytes hex"),
128+ git_hash::ObjectId::from_40_bytes_in_hex(parts[2].as_bytes()).expect("40 bytes hex"),
129129 parts[3..]
130130 .iter()
131− .map(|x| git_hash::Id::from_40_bytes_in_hex(x.as_bytes()).expect("40 bytes hex"))
131+ .map(|x| git_hash::ObjectId::from_40_bytes_in_hex(x.as_bytes()).expect("40 bytes hex"))
132132 .collect(),
133133 )
134134 })