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

Function record

atomic-repository/tests/it/whole_file_diff_test.rs:11–20  ·  view source on GitHub ↗
(repo: &Repository)

Source from the content-addressed store, hash-verified

9use tempfile::TempDir;
10
11fn record(repo: &Repository) -> Hash {
12 *repo
13 .record(
14 repo.require_working_copy_id().unwrap(),
15 ChangeHeader::builder().message("test").build(),
16 RecordOptions::default(),
17 )
18 .unwrap()
19 .hash()
20}
21
22/// Record `before`, then `after`, and return the second change.
23fn edit(before: &[u8], after: &[u8]) -> (TempDir, Repository, Hash, Change) {

Calls 6

hashMethod · 0.45
unwrapMethod · 0.45
recordMethod · 0.45
buildMethod · 0.45
messageMethod · 0.45

Tested by

no test coverage detected