mirror of
https://github.com/martinvonz/jj.git
synced 2025-01-15 16:53:25 +00:00
revset_graph: avoid construction of edges if already known
The stack can contain duplicated entries, and we only need the last one to resolve edges.
This commit is contained in:
parent
beb997e85a
commit
1bf6ab5370
1 changed files with 4 additions and 0 deletions
|
@ -200,6 +200,10 @@ impl<'revset, 'index> RevsetGraphIterator<'revset, 'index> {
|
|||
let mut stack = vec![index_entry];
|
||||
while let Some(entry) = stack.last() {
|
||||
let position = entry.position();
|
||||
if self.edges.contains_key(&position) {
|
||||
stack.pop().unwrap();
|
||||
continue;
|
||||
}
|
||||
let mut edges = HashSet::new();
|
||||
let mut parents_complete = true;
|
||||
for parent in entry.parents() {
|
||||
|
|
Loading…
Reference in a new issue