History

[commitgraph] implement basic, low-level read API

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.

Conor Davis committed 6 years ago

Commit d1f0e9c1 parent 1b42b3153 files · +1429 −-23Browse files

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

Unified · Split

git-commitgraph/tests/commitgraph.rs+12−0
@@ -0,0 +1,12 @@
1use git_object::owned;
2use std::path::PathBuf;
3
4mod access;
5
6pub fn fixture_path(path: &str) -> PathBuf {
7 PathBuf::from("tests").join("fixtures").join(path)
8}
9
10pub fn hex_to_id(hex: &[u8]) -> owned::Id {
11 owned::Id::from_40_bytes_in_hex(hex).expect("40 bytes hex")
12}