forked from mirrors/jj
cli_utils: reduce duplication in select_diff
This commit is contained in:
parent
fdf1a56178
commit
54d4c9c475
1 changed files with 1 additions and 10 deletions
|
@ -1485,16 +1485,7 @@ impl WorkspaceCommandTransaction<'_> {
|
|||
matcher: &dyn Matcher,
|
||||
) -> Result<TreeId, CommandError> {
|
||||
if interactive {
|
||||
let base_ignores = self.helper.base_ignores();
|
||||
let settings = &self.helper.settings;
|
||||
Ok(crate::merge_tools::edit_diff(
|
||||
ui,
|
||||
left_tree,
|
||||
right_tree,
|
||||
instructions,
|
||||
base_ignores,
|
||||
settings,
|
||||
)?)
|
||||
self.edit_diff(ui, left_tree, right_tree, instructions)
|
||||
} else if matcher.visit(&RepoPath::root()) == Visit::AllRecursively {
|
||||
// Optimization for a common case
|
||||
Ok(right_tree.id().clone())
|
||||
|
|
Loading…
Reference in a new issue