diff --git a/cli/src/cli_util.rs b/cli/src/cli_util.rs index 459b97fdbf..71af456307 100644 --- a/cli/src/cli_util.rs +++ b/cli/src/cli_util.rs @@ -52,8 +52,8 @@ use jj_lib::repo::{ }; use jj_lib::repo_path::{FsPathParseError, RepoPath, RepoPathBuf}; use jj_lib::revset::{ - Revset, RevsetAliasesMap, RevsetCommitRef, RevsetExpression, RevsetFilterPredicate, - RevsetIteratorExt, RevsetParseContext, RevsetWorkspaceContext, + RevsetAliasesMap, RevsetCommitRef, RevsetExpression, RevsetFilterPredicate, RevsetIteratorExt, + RevsetParseContext, RevsetWorkspaceContext, }; use jj_lib::rewrite::restore_tree; use jj_lib::settings::{ConfigResultExt as _, UserSettings}; @@ -880,13 +880,6 @@ impl WorkspaceCommandHelper { self.attach_revset_evaluator(expression) } - pub fn evaluate_revset<'repo>( - &'repo self, - expression: Rc, - ) -> Result, CommandError> { - Ok(self.attach_revset_evaluator(expression)?.evaluate()?) - } - fn attach_revset_evaluator( &self, expression: Rc, diff --git a/cli/src/commands/git.rs b/cli/src/commands/git.rs index 7b9fcda2b3..205e6258bd 100644 --- a/cli/src/commands/git.rs +++ b/cli/src/commands/git.rs @@ -1192,7 +1192,7 @@ fn find_branches_targeted_by_revisions<'a>( .range(&RevsetExpression::commit(wc_commit_id)) .intersection(&RevsetExpression::branches(StringPattern::everything())); let current_branches_revset = - workspace_command.evaluate_revset(current_branches_expression)?; + current_branches_expression.evaluate_programmatic(workspace_command.repo().as_ref())?; revision_commit_ids.extend(current_branches_revset.iter()); if revision_commit_ids.is_empty() { writeln!(