Skip to content

Commit

Permalink
fix remaining references to branch rather than bookmark
Browse files Browse the repository at this point in the history
  • Loading branch information
faldor20 committed Nov 1, 2024
1 parent d44f804 commit 20d9bc2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion jj_tui/bin/global_funcs.ml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ let update_views ?(cause_snapshot = false) () =
safe_jj (fun () ->
let rev = Vars.get_hovered_rev () in
let branches =
jj_no_log ~snapshot:cause_snapshot [ "branch"; "list"; "-a" ] |> colored_string
jj_no_log ~snapshot:cause_snapshot [ "bookmark"; "list"; "-a" ] |> colored_string
in
(* From now on we use ignore-working-copy so we don't re-snapshot the state and so
we can operate in paralell *)
Expand Down
10 changes: 5 additions & 5 deletions jj_tui/bin/jj_widgets.ml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ module Make (Vars : Global_vars.Vars) = struct

(*List of branches, containing the full output string as well as the string name*)
let get_branches template =
let log = jj_no_log ~snapshot:false [ "branch"; "list"; "-a"; "-T"; template ] in
let log = jj_no_log ~snapshot:false [ "bookmark"; "list"; "-a"; "-T"; template ] in
let lines = String.split_on_char '\n' log in
lines
|> List.filter_map (fun line ->
Expand Down Expand Up @@ -49,29 +49,29 @@ module Make (Vars : Global_vars.Vars) = struct
get_branches_selectable
({|if(!remote,name++"|}
^ "\u{1C}"
^ {|"++label("branch", name) ++ if(present, format_ref_targets(self), " (deleted)")++ "\n")|}
^ {|"++label("bookmark", name) ++ if(present, format_ref_targets(self), " (deleted)")++ "\n")|}
)
;;

let branches_remotes_no_git =
get_branches_selectable
@@ {|if(remote && !(remote.starts_with("git")&&remote.ends_with("git")), name++"|}
^ "\u{1C}"
^ {|"++label("branch", name++" @"++remote) ++ if(present, format_ref_targets(self), " (deleted)")++ "\n")|}
^ {|"++label("bookmark", name++" @"++remote) ++ if(present, format_ref_targets(self), " (deleted)")++ "\n")|}
;;

let branches_remotes_not_tracked =
get_branches_selectable
@@ {|if(remote && !(remote.starts_with("git")&&remote.ends_with("git")) && !tracked, name++"@"++remote++"|}
^ "\u{1C}"
^ {|"++label("branch", name++" @"++remote) ++ if(present, format_ref_targets(self), " (deleted)")++ "\n")|}
^ {|"++label("bookmark", name++" @"++remote) ++ if(present, format_ref_targets(self), " (deleted)")++ "\n")|}
;;

let branches_remotes_tracked =
get_branches_selectable
@@ {|if(remote && !(remote.starts_with("git")&&remote.ends_with("git")) && tracked, name++"@"++remote++"|}
^ "\u{1C}"
^ {|"++label("branch", name++" @"++remote) ++ if(present, format_ref_targets(self), " (deleted)")++ "\n")|}
^ {|"++label("bookmark", name++" @"++remote) ++ if(present, format_ref_targets(self), " (deleted)")++ "\n")|}
;;

let selection_list ?(focus = Focus.make ()) items =
Expand Down

0 comments on commit 20d9bc2

Please sign in to comment.