Print a stable, versioned status document for editor integrations.
(
&self,
status: &RepositoryStatus,
repo_root: &std::path::Path,
)
| 432 | |
| 433 | /// Print a stable, versioned status document for editor integrations. |
| 434 | fn print_json_format( |
| 435 | &self, |
| 436 | status: &RepositoryStatus, |
| 437 | repo_root: &std::path::Path, |
| 438 | ) -> CliResult<()> { |
| 439 | let output = JsonStatus::new(status, repo_root); |
| 440 | let json = serde_json::to_string_pretty(&output) |
| 441 | .map_err(|error| CliError::Internal(error.into()))?; |
| 442 | println!("{}", json); |
| 443 | Ok(()) |
| 444 | } |
| 445 | } |
| 446 | |
| 447 | impl Default for Status { |