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

Function change_object

atomic-cli/tests/clone_sidecar_integration_test.rs:48–60  ·  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

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