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

Function add

atomic-cli/tests/review_comparison_passes.rs:27–37  ·  view source on GitHub ↗
(repo: &Repository, path: &str, text: &str)

Source from the content-addressed store, hash-verified

25 .hash()
26}
27fn add(repo: &Repository, path: &str, text: &str) {
28 let full = repo.root().join(path);
29 std::fs::create_dir_all(full.parent().unwrap()).unwrap();
30 std::fs::write(full, text).unwrap();
31 repo.add(
32 repo.require_working_copy_id().unwrap(),
33 path,
34 TrackingOptions::default(),
35 )
36 .unwrap();
37}
38fn governance(repo: &Repository, hash: Hash, plan: &str) {
39 let session = format!("comparison-{plan}");
40 let graph = ProvenanceGraph::builder(&session, "test")

Calls 6

parentMethod · 0.80
writeFunction · 0.70
rootMethod · 0.45
unwrapMethod · 0.45
addMethod · 0.45

Tested by

no test coverage detected