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

Function record_file

atomic-cli/tests/it/routing_parity_test.rs:947–951  ·  view source on GitHub ↗

Record one change touching `name` with the given content (a fixture shorthand).

(repo_dir: &Path, home_dir: &Path, name: &str, body: &str, message: &str)

Source from the content-addressed store, hash-verified

945/// Record one change touching `name` with the given content (a fixture
946/// shorthand).
947fn record_file(repo_dir: &Path, home_dir: &Path, name: &str, body: &str, message: &str) {
948 std::fs::write(repo_dir.join(name), body).unwrap();
949 run(repo_dir, home_dir, &["add", name]);
950 run(repo_dir, home_dir, &["record", "-m", message]);
951}
952
953#[test]
954fn restore_dry_run_single_file_dumps_pristine_bytes() {

Calls 3

writeFunction · 0.70
runFunction · 0.70
unwrapMethod · 0.45

Tested by

no test coverage detected