Jujutsu's templates for this are for how far ahead/behind the remote branch is than compared to the local branch vs how far ahead/behind we are from the remote branch... it makes more sense to have this the other way around (and clarify in the comment...)
+7
-6
packetmix/homes/minion/zsh/p10k.zsh
+7
-6
packetmix/homes/minion/zsh/p10k.zsh
···
1760
'))
1761
1762
local VCS_STATUS_LOCAL_BRANCH=$branch
1763
-
local VCS_STATUS_COMMITS_AHEAD=$counts[2]
1764
-
local VCS_STATUS_COMMITS_BEHIND=$counts[3]
1765
-
local VCS_STATUS_COMMITS_AHEAD_PLUS=$counts[4]
1766
-
local VCS_STATUS_COMMITS_BEHIND_PLUS=$counts[5]
1767
fi
1768
1769
local status_char=''
···
1783
1784
1785
## jj_remote
1786
-
# โก42 if ahead of the remote.
1787
(( VCS_STATUS_COMMITS_AHEAD )) && res+=" ${green}โก${VCS_STATUS_COMMITS_AHEAD}"
1788
(( VCS_STATUS_COMMITS_AHEAD_PLUS )) && res+="${VCS_STATUS_COMMITS_AHEAD_PLUS}"
1789
-
# โฃ42 if behind the remote; no leading space if also ahead of the remote: โก42โฃ42.
1790
(( VCS_STATUS_COMMITS_BEHIND && !VCS_STATUS_COMMITS_AHEAD )) && res+=" "
1791
(( VCS_STATUS_COMMITS_BEHIND )) && res+="${red}โฃ${VCS_STATUS_COMMITS_BEHIND}"
1792
(( VCS_STATUS_COMMITS_BEHIND_PLUS )) && res+="${VCS_STATUS_COMMITS_BEHIND_PLUS}"
···
1760
'))
1761
1762
local VCS_STATUS_LOCAL_BRANCH=$branch
1763
+
# note: the tracking_ahead_count and tracking_behind_count refer to whether the remote bookmark is ahead or behind the local bookmark, we want the other way round...
1764
+
local VCS_STATUS_COMMITS_BEHIND=$counts[2]
1765
+
local VCS_STATUS_COMMITS_AHEAD=$counts[3]
1766
+
local VCS_STATUS_COMMITS_BEHIND_PLUS=$counts[4]
1767
+
local VCS_STATUS_COMMITS_AHEAD_PLUS=$counts[5]
1768
fi
1769
1770
local status_char=''
···
1784
1785
1786
## jj_remote
1787
+
# โก42 if our local branch is ahead of the remote.
1788
(( VCS_STATUS_COMMITS_AHEAD )) && res+=" ${green}โก${VCS_STATUS_COMMITS_AHEAD}"
1789
(( VCS_STATUS_COMMITS_AHEAD_PLUS )) && res+="${VCS_STATUS_COMMITS_AHEAD_PLUS}"
1790
+
# โฃ42 if our local branch is behind the remote; no leading space if our local branch is also ahead of the remote: โก42โฃ42.
1791
(( VCS_STATUS_COMMITS_BEHIND && !VCS_STATUS_COMMITS_AHEAD )) && res+=" "
1792
(( VCS_STATUS_COMMITS_BEHIND )) && res+="${red}โฃ${VCS_STATUS_COMMITS_BEHIND}"
1793
(( VCS_STATUS_COMMITS_BEHIND_PLUS )) && res+="${VCS_STATUS_COMMITS_BEHIND_PLUS}"
History
1 round
0 comments
a.starrysky.fyi
submitted
#0
1 commit
expand
collapse
fix(p10k): flip jujutsu ahead/behind markers
Jujutsu's templates for this are for how far ahead/behind the remote
branch is than compared to the local branch vs how far ahead/behind we
are from the remote branch... it makes more sense to have this the other
way around (and clarify in the comment...)
expand 0 comments
pull request successfully merged