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

Function change_bytes

atomic-repository/tests/it/remote_cache_parity_test.rs:47–59  ·  view source on GitHub ↗

Record without saving or applying: just the change.

(repo: &Repository, header: ChangeHeader)

Source from the content-addressed store, hash-verified

45
46/// Record without saving or applying: just the change.
47fn change_bytes(repo: &Repository, header: ChangeHeader) -> (String, Vec<u8>) {
48 let options = RecordOptions::new()
49 .with_all(true)
50 .save_to_store(false)
51 .apply_after_record(false);
52 let outcome = repo
53 .record(repo.require_working_copy_id().unwrap(), header, options)
54 .unwrap_or_else(|e| panic!("record in {}: {e}", repo.root().display()));
55 (
56 atomic_core::types::Base32::to_base32(outcome.hash()),
57 outcome.v3_bytes().expect("v3 bytes").to_vec(),
58 )
59}
60
61struct Pair {
62 _dirs: (TempDir, TempDir),

Calls 8

apply_after_recordMethod · 0.80
save_to_storeMethod · 0.80
v3_bytesMethod · 0.80
with_allMethod · 0.45
recordMethod · 0.45
unwrapMethod · 0.45
hashMethod · 0.45

Tested by

no test coverage detected