From b6d95c3504626dd81cce3c768821759fbe35e74b Mon Sep 17 00:00:00 2001 From: Yuya Nishihara Date: Sun, 12 May 2024 13:59:30 +0900 Subject: [PATCH] cli: use high-level show_diff() function in cmd_status() As I'm going to remove &WorkspaceCommandHelper from these functions, it will be a bit more verbose to call low-level show_*() functions. --- cli/src/commands/status.rs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/cli/src/commands/status.rs b/cli/src/commands/status.rs index 3eaa52b1a..cf2dabdf9 100644 --- a/cli/src/commands/status.rs +++ b/cli/src/commands/status.rs @@ -19,6 +19,7 @@ use tracing::instrument; use crate::cli_util::{print_conflicted_paths, CommandHelper}; use crate::command_error::CommandError; +use crate::diff_util::DiffFormat; use crate::ui::Ui; use crate::{diff_util, revset_util}; @@ -64,10 +65,14 @@ pub(crate) fn cmd_status( writeln!(formatter, "The working copy is clean")?; } else { writeln!(formatter, "Working copy changes:")?; - diff_util::show_diff_summary( + diff_util::show_diff( + ui, formatter, &workspace_command, - parent_tree.diff_stream(&tree, matcher.as_ref()), + &parent_tree, + &tree, + &matcher, + &[DiffFormat::Summary], )?; }