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

Function change_object

atomic-cli/tests/it/clone_sidecar_integration_test.rs:47–59  ·  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

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