mirror of
https://github.com/martinvonz/jj.git
synced 2024-11-28 17:41:14 +00:00
revset: reuse reachable dag-range set to calculate roots
This also removes the use of RevsetExpression::connected() API from the evaluation engine.
This commit is contained in:
parent
20aa31336e
commit
eef6a77aa4
1 changed files with 2 additions and 4 deletions
|
@ -688,11 +688,9 @@ impl<'index, 'heads> EvaluationContext<'index, 'heads> {
|
|||
.revset_for_commit_ids(&self.composite_index.heads(&mut candidate_ids.iter())))
|
||||
}
|
||||
RevsetExpression::Roots(candidates) => {
|
||||
let connected_set = self.evaluate(&candidates.connected())?;
|
||||
let filled: HashSet<_> =
|
||||
connected_set.iter().map(|entry| entry.position()).collect();
|
||||
let mut index_entries = vec![];
|
||||
let candidate_set = self.evaluate(candidates)?;
|
||||
let (_, filled) = self.collect_dag_range(&*candidate_set, &*candidate_set);
|
||||
let mut index_entries = vec![];
|
||||
for candidate in candidate_set.iter() {
|
||||
if !candidate
|
||||
.parent_positions()
|
||||
|
|
Loading…
Reference in a new issue