···2424 then fg green ++ st bold
2525 else if node.conflict
2626 then fg red ++ st bold
2727+ else if node.divergent
2828+ then fg red ++ st bold
2729 else if node.immutable
2830 then fg cyan
2931 else fg white
···4244 let open Notty in
4345 let open Notty.A in
44464545- let magenta= if node.working_copy then lightmagenta else magenta in
4646-(*make style bold if working copy*)
4747-let bs = if node.working_copy then st bold else st A.no_style in
4747+ let magenta = if node.working_copy then lightmagenta else magenta in
4848+ (* make style bold if working copy *)
4949+ let bs = if node.working_copy then st bold else st A.no_style in
4850 let styled_text attr text = I.string attr text in
4951 let description_line =
5052 match String.split_on_char '\n' node.description with
···5557 in
5658 (* Line 1: change_id email timestamp bookmarks commit_id_short *)
5759 let line1_parts = ref [] in
5858- (* Determine base color for change_id based on node state *)
5959-6060 (* Render change_id with prefix highlighting *)
6161- let change_id_prefix_attr =
6262- fg magenta ++ st bold
6161+ let change_id_prefix_attr, change_id_rest_attr =
6262+ if node.hidden
6363+ then
6464+ let duplicate_attr = fg white ++ st bold in
6565+ duplicate_attr, duplicate_attr
6666+ else if node.divergent
6767+ then fg red ++ st bold, fg red ++ bs
6868+ else fg magenta ++ st bold, fg lightblack ++ bs
6369 in
6464- let change_id_rest_attr = fg lightblack ++bs in
6570 let change_id_img =
6671 render_id
6772 ~prefix_attr:change_id_prefix_attr
···7176 in
7277 line1_parts := change_id_img :: !line1_parts;
7378 (* Author email and timestamp *)
7474- line1_parts
7575- := styled_text (fg yellow ++bs) (" " ^ node.author_email) :: !line1_parts;
7676- line1_parts
7777- := styled_text (fg cyan++bs ) (" " ^ node.author_timestamp) :: !line1_parts;
7979+ line1_parts := styled_text (fg yellow ++ bs) (" " ^ node.author_email) :: !line1_parts;
8080+ line1_parts := styled_text (fg cyan ++ bs) (" " ^ node.author_timestamp) :: !line1_parts;
7881 (* Add bookmarks after timestamp if they exist *)
7982 if List.length node.bookmarks > 0
8083 then (
8184 let bookmarks_str = " " ^ String.concat " " node.bookmarks in
8282- line1_parts := styled_text (fg magenta ) bookmarks_str :: !line1_parts);
8585+ line1_parts := styled_text (fg magenta) bookmarks_str :: !line1_parts);
8386 (* Render commit_id with prefix highlighting *)
8484- let commit_id_prefix_attr = (if node.working_copy then fg lightblue else fg blue) ++ st bold in
8585- let commit_id_rest_attr = fg lightblack ++bs in
8787+ let commit_id_prefix_attr =
8888+ (if node.working_copy then fg lightblue else fg blue) ++ st bold
8989+ in
9090+ let commit_id_rest_attr = fg lightblack ++ bs in
8691 let commit_id_img =
8792 render_id
8893 ~prefix_attr:commit_id_prefix_attr
···9196 ~rest:node.commit_id_rest
9297 in
9398 line1_parts := commit_id_img :: !line1_parts;
9999+ let labels =
100100+ [ if node.hidden then Some (fg lightblack ++ bs, "(hidden)") else None
101101+ ; if node.divergent then Some (fg red ++ bs, "(divergent)") else None
102102+ ]
103103+ |> List.filter_map Fun.id
104104+ in
105105+ labels
106106+ |> List.iter (fun (attr, label) ->
107107+ line1_parts := styled_text attr (" " ^ label) :: !line1_parts);
94108 let line1 = !line1_parts |> List.rev |> I.hcat in
95109 (* Line 2: (empty) description *)
96110 let desc_attr =
9797- ( if node.is_preview || node.empty
9898- then lightgreen
9999- else if node.description=""
100100- then yellow
101101- else white)
102102- |>fg|> (++) bs
111111+ (if node.is_preview || node.empty
112112+ then lightgreen
113113+ else if node.description = ""
114114+ then yellow
115115+ else white)
116116+ |> fg
117117+ |> ( ++ ) bs
103118 in
104119 let description_with_prefix =
105120 if node.empty then "(empty) " ^ description_line else description_line
106121 in
107122 let line2 = styled_text desc_attr description_with_prefix in
108108- [add_padding line1; add_padding line2 ]
123123+ [ add_padding line1; add_padding line2 ]
109124;;