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, matcher: &dyn Matcher,
) -> Result<TreeId, CommandError> { ) -> Result<TreeId, CommandError> {
if interactive { if interactive {
let base_ignores = self.helper.base_ignores(); self.edit_diff(ui, left_tree, right_tree, instructions)
let settings = &self.helper.settings;
Ok(crate::merge_tools::edit_diff(
ui,
left_tree,
right_tree,
instructions,
base_ignores,
settings,
)?)
} else if matcher.visit(&RepoPath::root()) == Visit::AllRecursively { } else if matcher.visit(&RepoPath::root()) == Visit::AllRecursively {
// Optimization for a common case // Optimization for a common case
Ok(right_tree.id().clone()) Ok(right_tree.id().clone())