Load the change ledger(s) — the causal decision graph(s) from the `.provenance` file — for JSON output. Mirrors the `=== Change Ledger ===` section of the default text format. Missing/corrupt provenance is non-fatal: the ledger simply stays empty (and is omitted from the JSON).
(&self, hash: &Hash, repo: &Repository)
| 671 | /// section of the default text format. Missing/corrupt provenance is |
| 672 | /// non-fatal: the ledger simply stays empty (and is omitted from the JSON). |
| 673 | fn load_json_ledger(&self, hash: &Hash, repo: &Repository) -> Vec<JsonChangeLedger> { |
| 674 | repo.find_provenance_for_change(hash) |
| 675 | .unwrap_or_default() |
| 676 | .iter() |
| 677 | .map(|(graph_hash, graph)| JsonChangeLedger::from_graph(graph_hash, graph)) |
| 678 | .collect() |
| 679 | } |
| 680 | |
| 681 | /// Print the change in the configured format. |
| 682 | fn print_change(&self, change: &Change, hash: &Hash, sequence: Option<u64>, repo: &Repository) { |
no test coverage detected