Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Do not modify the subgraph of the target of an Update::NewEdge when t…
…he edge target already exists The scenario: * `detect_confilcts_and_updates` walks the `onto` graph as its basis for detecting things. * If we don't find any candidates for equivalency for a particular node in `onto` from the nodes in `to_rebase`, then we do nothing, and prune the walk of the `onto` graph at that point. * When processing a container in `find_container_membership_conflicts_and_updates` (processing a/the parent of the potentially new node). * There is an entry in `only_onto_edges` for the edge pointing to a node. (May or may not be to a new node) * We generate an `Update::NewEdge` * If the node exists already in `to_rebase` (not new) * When processing the DFS event for the node, we continue walking the `onto` graph through this node as long as we continue to find equivalent nodes in `to_rebase`, generating `Update`s as necessary. * If the node does _not_ already exist in `to_rebase` (it's new) * When processing the DFS event for the node, we prune the `onto` graph walk as we could not find an equivalent node, and do not generate any `Update` for the node that only exists in `onto`. So, when `Update::NewEdge` happens in `perform_updates`, if an equivalent node is found, we want to use it as-is, since there should be other `Update` to process that will handle any updates necessary for the target (and any children). If no equivalent node is found, then we want to import the "new" bits from the subgraph starting at the target of the edge, since there won't be any `Update` to process that will handle bringing in those new things.
- Loading branch information