[go: up one dir, main page]

git-object 0.1.0

Borrowed and owned git objects with deserialization and serialization support
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use std::path::PathBuf;

mod borrowed;

pub fn hex_to_id(hex: &str) -> git_object::Id {
    git_object::Id::from_hex(hex.as_bytes()).unwrap()
}

pub fn fixture(path: &str) -> PathBuf {
    PathBuf::from("tests/fixtures").join(path)
}

fn fixture_bytes(path: &str) -> Vec<u8> {
    std::fs::read(fixture(path)).unwrap()
}