Skip to content

Commit

Permalink
resolve: remove --quiet flag, rely on global one
Browse files Browse the repository at this point in the history
  • Loading branch information
martinvonz committed Apr 1, 2024
1 parent 084ba0e commit b0696ff
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 21 deletions.
27 changes: 10 additions & 17 deletions cli/src/commands/resolve.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<String>,
Expand Down Expand Up @@ -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(())
}

Expand Down
4 changes: 0 additions & 4 deletions cli/tests/[email protected]
Original file line number Diff line number Diff line change
Expand Up @@ -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 <NAME>` — Specify 3-way merge tool to be used
Expand Down

0 comments on commit b0696ff

Please sign in to comment.