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

Method load_json_ledger

atomic-cli/src/commands/change/command.rs:385–390  ·  view source on GitHub ↗

Load the change ledger(s) — the causal decision graph(s) from the `.provenance` file — for JSON output. Mirrors the `Change Ledger` branch of the default text format. Missing/corrupt provenance is non-fatal: the ledger simply stays empty (and is omitted from the JSON).

(&self, graphs: &[(Hash, ProvenanceGraph)])

Source from the content-addressed store, hash-verified

383 /// branch of the default text format. Missing/corrupt provenance is
384 /// non-fatal: the ledger simply stays empty (and is omitted from the JSON).
385 fn load_json_ledger(&self, graphs: &[(Hash, ProvenanceGraph)]) -> Vec<JsonChangeLedger> {
386 graphs
387 .iter()
388 .map(|(graph_hash, graph)| JsonChangeLedger::from_graph(graph_hash, graph))
389 .collect()
390 }
391
392 /// Print the change in the configured format.
393 pub(crate) fn print_change(

Callers 1

print_changeMethod · 0.80

Calls 2

collectMethod · 0.45
iterMethod · 0.45

Tested by

no test coverage detected