MCPcopy Create free account
hub / github.com/emwalker/digraph / blank

Method blank

backend/tests/git/fixtures.rs:37–54  ·  view source on GitHub ↗
(fixture_dirname: &str)

Source from the content-addressed store, hash-verified

35
36impl Fixtures {
37 fn blank(fixture_dirname: &str) -> Self {
38 let root = &env::var("CARGO_MANIFEST_DIR").expect("$CARGO_MANIFEST_DIR");
39 let mut source = PathBuf::from(root);
40 source.push("tests/fixtures");
41 source.push(fixture_dirname);
42
43 let tempdir = tempfile::tempdir().unwrap();
44 let path = PathBuf::from(&tempdir.path());
45 let root = DataRoot::new(path.clone());
46 let git = Client::new(actor(), &root, Timespec);
47
48 Fixtures {
49 _tempdir: tempdir,
50 git,
51 path,
52 source,
53 }
54 }
55
56 pub fn mutation(&self) -> Mutation {
57 self.git.mutation(IndexMode::Update).unwrap()

Callers

nothing calls this directly

Calls 2

actorFunction · 0.85
pathMethod · 0.80

Tested by

no test coverage detected