You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This would be really useful for the reasons I went into here, basically because it makes things much simpler when using the GitHub Pull Request workflow.
Workaround
In case this is useful to anyone else, I currently work around it by adding the following lines to my p10k.zsh:
local -a push_behind_ahead=(${(ps:\t:)"$(command git rev-list --left-right --count HEAD...@{push} 2>/dev/null)"})
local VCS_STATUS_PUSH_COMMITS_AHEAD="${push_behind_ahead[1]}"local VCS_STATUS_PUSH_COMMITS_BEHIND="${push_behind_ahead[2]}"# ⇠42 if behind the @{push} branch.(( VCS_STATUS_PUSH_COMMITS_BEHIND ))&& res+="${clean}⇠${VCS_STATUS_PUSH_COMMITS_BEHIND}"(( VCS_STATUS_PUSH_COMMITS_AHEAD &&!VCS_STATUS_PUSH_COMMITS_BEHIND ))&& res+=""# ⇢42 if ahead of the @{push} branch; no leading space if also behind: ⇠42⇢42.(( VCS_STATUS_PUSH_COMMITS_AHEAD ))&& res+="${clean}⇢${VCS_STATUS_PUSH_COMMITS_AHEAD}"
I tried to make it match the existing code as much as possible, to the point where if the gitstatus PR was shipped and the variables defined, in theory the second chunk could be PR'd directly against the repo.
The text was updated successfully, but these errors were encountered:
gibfahn
added a commit
to gibfahn/dot
that referenced
this issue
Dec 25, 2019
Requires romkatv/gitstatus#89
This would be really useful for the reasons I went into here, basically because it makes things much simpler when using the GitHub Pull Request workflow.
Workaround
In case this is useful to anyone else, I currently work around it by adding the following lines to my
p10k.zsh
:You want to add them under this line:
I tried to make it match the existing code as much as possible, to the point where if the gitstatus PR was shipped and the variables defined, in theory the second chunk could be PR'd directly against the repo.
The text was updated successfully, but these errors were encountered: