ok/jj
1
0
Fork 0
forked from mirrors/jj

cli_utils: reduce duplication in select_diff

This commit is contained in:
Ilya Grigoriev 2023-08-15 17:54:03 -07:00
parent fdf1a56178
commit 54d4c9c475

View file

@ -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())