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

Function save_downloaded_change

libatomic/src/daemon/services_sync_remote.rs:1012–1016  ·  view source on GitHub ↗

The local `save_downloaded_change` — deserialize, verify the hash, save.

(repo: &Repository, hash: &Hash, data: Bytes)

Source from the content-addressed store, hash-verified

1010
1011/// The local `save_downloaded_change` — deserialize, verify the hash, save.
1012fn save_downloaded_change(repo: &Repository, hash: &Hash, data: Bytes) -> Result<(), String> {
1013 repo.import_change_bytes(hash, &data)
1014 .map(|_| ())
1015 .map_err(|error| format!("Failed to save change: {error}"))
1016}
1017
1018/// The local `import_sidecars` (sidecars.rs) — ingest the pack's
1019/// provenance graphs and attestations; warnings collect for the client.

Callers 1

pull_changes_implFunction · 0.70

Calls 1

import_change_bytesMethod · 0.80

Tested by

no test coverage detected