terminal user interface to jujutsu. Focused on speed and clarity
10
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix parent connections during rebase

+13 -2
+13 -2
jj_tui/lib/render_jj_graph.ml
··· 593 593 else ( 594 594 let parent_map_all = build_parent_map nodes in 595 595 let children_map_all = build_children_map parent_map_all in 596 - let ancestors_of = build_ancestors parent_map_all in 596 + let parent_map_validation = Hashtbl.copy parent_map_all in 597 + List.iter 598 + (fun source_id -> Hashtbl.remove parent_map_validation source_id) 599 + source_ids; 600 + Hashtbl.iter 601 + (fun child_id parent_ids -> 602 + let filtered = 603 + List.filter (fun id -> not (StringSet.mem id source_set)) parent_ids 604 + in 605 + Hashtbl.replace parent_map_validation child_id filtered) 606 + parent_map_validation; 607 + let ancestors_of = build_ancestors parent_map_validation in 597 608 let nodes_filtered, parent_map, children_map = 598 609 build_filtered_maps ~nodes ~source_set 599 610 in ··· 624 635 then ( 625 636 let child_parents = 626 637 Option.value (Hashtbl.find_opt parent_map_all child_id) ~default:[] 627 - |> List.filter (fun id -> not (StringSet.mem id source_set)) 628 638 in 629 639 let updated = 630 640 child_parents 631 641 |> List.concat_map (fun parent_id -> 632 642 if parent_id = source_id then source_parents else [ parent_id ]) 643 + |> List.filter (fun id -> not (StringSet.mem id source_set)) 633 644 |> dedupe_preserve_order 634 645 in 635 646 Hashtbl.replace parent_map child_id updated))