this repo has no description
1setopt localoptions NO_shwordsplit
2
3local action branch base staged unstaged revision_prefix revision_rest misc
4local _is_working_copy _is_root _is_empty _bookmarks _bookmark_id _parent_id
5
6eval `${vcs_comm[cmd]} log --ignore-working-copy -n 1 --no-graph --color never \
7 -r "coalesce(ancestors(present(@)) & bookmarks(), root())" \
8 -T '
9 separate(" ",
10 "_bookmark_id=" ++ change_id,
11 "_is_working_copy=" ++ current_working_copy,
12 "_is_root=" ++ root,
13 "branch=\"" ++ bookmarks.join(" ") ++ "\"",
14 )
15 '`
16
17eval `${vcs_comm[cmd]} log --ignore-working-copy -n 1 --no-graph --color never -r "@" \
18 -T '
19 separate(" ",
20 "description=\"" ++ truncate_end(24, description.first_line().trim(), "…") ++ "\"",
21 "revision_prefix=\"" ++ change_id.shortest(8).prefix() ++ "\"",
22 "revision_rest=\"" ++ change_id.shortest(8).rest() ++ "\"",
23 "_parent_id=\"" ++ parents.map(|c| c.change_id()).join("-") ++ "\"",
24 if(empty, "", "unstaged=true"),
25 if(conflict, "action=conflict")
26 )'`
27
28if [[ $_is_working_copy == "false" && $_bookmark_id != $_parent_id ]]; then
29 staged=true
30fi
31
32if [[ $_is_root == "true" ]]; then
33 branch="root()"
34fi
35
36VCS_INFO_formats "${action}" "${branch}" "${base}" "${staged}" "${unstaged}" "%F{magenta}${revision_prefix}%F{black,light}${revision_rest}" "${description}"