From 6b3c7a0a6ec360d31a06a3f26f650833f2133d1c Mon Sep 17 00:00:00 2001 From: Martin von Zweigbergk Date: Sun, 31 Mar 2024 22:32:43 -0700 Subject: [PATCH] resolve: remove `--quiet` flag, rely on global one --- cli/src/commands/resolve.rs | 27 ++++++++++----------------- cli/tests/cli-reference@.md.snap | 4 ---- 2 files changed, 10 insertions(+), 21 deletions(-) diff --git a/cli/src/commands/resolve.rs b/cli/src/commands/resolve.rs index 98ba6b1f7f..5f622fe7b5 100644 --- a/cli/src/commands/resolve.rs +++ b/cli/src/commands/resolve.rs @@ -51,10 +51,6 @@ pub(crate) struct ResolveArgs { // `diff --summary`, but should be more verbose. #[arg(long, short)] list: bool, - /// Do not print the list of remaining conflicts (if any) after resolving a - /// conflict - #[arg(long, short, conflicts_with = "list")] - quiet: bool, /// Specify 3-way merge tool to be used #[arg(long, conflicts_with = "list", value_name = "NAME")] tool: Option, @@ -115,20 +111,17 @@ pub(crate) fn cmd_resolve( format!("Resolve conflicts in commit {}", commit.id().hex()), )?; - // TODO: Delete local `--quiet` - if !args.quiet { - if let Some(mut formatter) = ui.status_formatter() { - let new_tree = new_commit.tree()?; - let new_conflicts = new_tree.conflicts().collect_vec(); - if !new_conflicts.is_empty() { - writeln!( - formatter, - "After this operation, some files at this revision still have conflicts:" - )?; - print_conflicted_paths(&new_conflicts, formatter.as_mut(), &workspace_command)?; - } + if let Some(mut formatter) = ui.status_formatter() { + let new_tree = new_commit.tree()?; + let new_conflicts = new_tree.conflicts().collect_vec(); + if !new_conflicts.is_empty() { + writeln!( + formatter, + "After this operation, some files at this revision still have conflicts:" + )?; + print_conflicted_paths(&new_conflicts, formatter.as_mut(), &workspace_command)?; } - }; + } Ok(()) } diff --git a/cli/tests/cli-reference@.md.snap b/cli/tests/cli-reference@.md.snap index 85b4b4ace1..f73c3fea4c 100644 --- a/cli/tests/cli-reference@.md.snap +++ b/cli/tests/cli-reference@.md.snap @@ -1523,10 +1523,6 @@ Note that conflicts can also be resolved without using this command. You may edi Possible values: `true`, `false` -* `-q`, `--quiet` — Do not print the list of remaining conflicts (if any) after resolving a conflict - - Possible values: `true`, `false` - * `--tool ` — Specify 3-way merge tool to be used