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

Function change_object

atomic-cli/tests/it/clone_sidecar_integration_test.rs:49–61  ·  view source on GitHub ↗

Serialize a change and return `(bytes, hash)` — the object a server stores under `changes/{blake3}`.

()

Source from the content-addressed store, hash-verified

47/// Serialize a change and return `(bytes, hash)` — the object a server stores
48/// under `changes/{blake3}`.
49fn change_object() -> (Vec<u8>, Hash) {
50 let change = Change::new(
51 ChangeHeader::builder()
52 .message("clone sidecar regression")
53 .build(),
54 vec![],
55 vec![],
56 vec![],
57 );
58 let mut buf = Vec::new();
59 let hash = change.serialize(&mut buf).expect("serialize change");
60 (buf, hash)
61}
62
63/// A small session-scoped `SyncPack` for one change: the change object, the
64/// `dev` view's snapshot + ref, a provenance graph explaining the change, and

Calls 3

buildMethod · 0.45
messageMethod · 0.45
serializeMethod · 0.45

Tested by

no test coverage detected