mirror of
https://github.com/martinvonz/jj.git
synced 2024-12-28 07:20:11 +00:00
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.
This commit is contained in:
parent
13f10f6957
commit
b6d95c3504
1 changed files with 7 additions and 2 deletions
|
@ -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],
|
||||
)?;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue