Print the change in the configured format.
(&self, change: &Change, hash: &Hash, sequence: Option<u64>, repo: &Repository)
| 680 | |
| 681 | /// Print the change in the configured format. |
| 682 | fn print_change(&self, change: &Change, hash: &Hash, sequence: Option<u64>, repo: &Repository) { |
| 683 | let output = match self.format { |
| 684 | ChangeFormat::Default => self.format_default(change, hash, sequence, repo), |
| 685 | ChangeFormat::Short => self.format_short(change, hash, sequence), |
| 686 | ChangeFormat::Json => { |
| 687 | let ledger = self.load_json_ledger(hash, repo); |
| 688 | self.format_json(change, hash, sequence, ledger) |
| 689 | } |
| 690 | }; |
| 691 | print!("{}", output); |
| 692 | } |
| 693 | } |
| 694 | |
| 695 | /// Extract a human-readable one-liner from a provenance node's detail JSON. |
no test coverage detected