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

Function add_file

atomic-repository/tests/it/view_split_test.rs:23–27  ·  view source on GitHub ↗
(repo: &Repository, repo_path: &Path, name: &str, content: &str)

Source from the content-addressed store, hash-verified

21}
22
23fn add_file(repo: &Repository, repo_path: &Path, name: &str, content: &str) {
24 fs::write(repo_path.join(name), content).expect("write file");
25 repo.add(working_copy(repo), name, Default::default())
26 .expect("add file");
27}
28
29fn write_only(repo_path: &Path, name: &str, content: &str) {
30 fs::write(repo_path.join(name), content).expect("write file");

Calls 3

writeFunction · 0.70
working_copyFunction · 0.70
addMethod · 0.45

Tested by

no test coverage detected