This is just the first pass at ensuring we can read commit-graph files correctly. It does not support anything interesting like reachability, merge-base, or ahead-behind queries.
Showing the changes to git-commitgraph/tests/commitgraph.rs (1 of 53 files). Show all
Unified · Split
| @@ -0,0 +1,12 @@ | ||
| 1 | +use git_object::owned; | |
| 2 | +use std::path::PathBuf; | |
| 3 | + | |
| 4 | +mod access; | |
| 5 | + | |
| 6 | +pub fn fixture_path(path: &str) -> PathBuf { | |
| 7 | + PathBuf::from("tests").join("fixtures").join(path) | |
| 8 | +} | |
| 9 | + | |
| 10 | +pub fn hex_to_id(hex: &[u8]) -> owned::Id { | |
| 11 | + owned::Id::from_40_bytes_in_hex(hex).expect("40 bytes hex") | |
| 12 | +} | |