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,
|
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())
|
||||||
|
|
Loading…
Reference in a new issue