MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / build

Method build

atomic-cli/tests/it/import_budget_100k_bench.rs:320–351  ·  view source on GitHub ↗
(watch_enabled: bool)

Source from the content-addressed store, hash-verified

318
319impl EquivFixture {
320 fn build(watch_enabled: bool) -> Self {
321 let root = tempfile::TempDir::new().expect("equiv repo tempdir");
322 let home = tempfile::TempDir::new().expect("equiv home tempdir");
323 let root = root;
324 let home = home;
325
326 git_ok(root.path(), &["init", "-q", "-b", "main"]);
327 fs::write(root.path().join("anchor.txt"), b"anchor me\n").expect("anchor file");
328 make_corpus(root.path(), EQUIV_DIRS, EQUIV_FILES_PER_DIR, "v1");
329 git_ok(root.path(), &["add", "-A"]);
330 git_ok(root.path(), &["commit", "-qm", "equiv corpus v1"]);
331
332 atomic_ok(root.path(), home.path(), &["init", "--no-vault"]);
333 fs::remove_file(root.path().join(".atomicignore")).expect("remove atomicignore");
334 atomic_ok(root.path(), home.path(), &["git", "import", "--no-vault"]);
335 atomic_ok(
336 root.path(),
337 home.path(),
338 &[
339 "git",
340 "shim",
341 "enable",
342 "--binding-key-file",
343 key_file(home.path()).to_str().expect("utf8 key path"),
344 ],
345 );
346 atomic_ok(root.path(), home.path(), &["git", "shim", "reconcile"]);
347 if watch_enabled {
348 enable_watch(root.path());
349 }
350 Self { root, home }
351 }
352
353 fn root(&self) -> &Path {
354 self.root.path()

Callers 15

exchangeFunction · 0.45
materializeFunction · 0.45
fixtureFunction · 0.45
fetch_latestFunction · 0.45
provenance_forFunction · 0.45
attestation_forFunction · 0.45
runMethod · 0.45
compileMethod · 0.45

Calls 7

make_corpusFunction · 0.85
git_okFunction · 0.70
writeFunction · 0.70
atomic_okFunction · 0.70
key_fileFunction · 0.70
enable_watchFunction · 0.70
pathMethod · 0.45

Tested by

no test coverage detected