mirror of
https://github.com/romkatv/powerlevel10k.git
synced 2024-12-25 16:31:57 +00:00
pull upstream changes from gitstatus
This commit is contained in:
parent
22f0d6a82a
commit
5fc38b0586
2 changed files with 12 additions and 2 deletions
Binary file not shown.
|
@ -39,6 +39,8 @@
|
||||||
# VCS_STATUS_NUM_CONFLICTED=0
|
# VCS_STATUS_NUM_CONFLICTED=0
|
||||||
# VCS_STATUS_NUM_STAGED=0
|
# VCS_STATUS_NUM_STAGED=0
|
||||||
# VCS_STATUS_NUM_UNSTAGED=1
|
# VCS_STATUS_NUM_UNSTAGED=1
|
||||||
|
# VCS_STATUS_NUM_STAGED_NEW=0
|
||||||
|
# VCS_STATUS_NUM_STAGED_DELETED=0
|
||||||
# VCS_STATUS_NUM_UNSTAGED_DELETED=0
|
# VCS_STATUS_NUM_UNSTAGED_DELETED=0
|
||||||
# VCS_STATUS_NUM_UNTRACKED=1
|
# VCS_STATUS_NUM_UNTRACKED=1
|
||||||
# VCS_STATUS_REMOTE_BRANCH=master
|
# VCS_STATUS_REMOTE_BRANCH=master
|
||||||
|
@ -108,8 +110,12 @@ typeset -g _gitstatus_plugin_dir=${${(%):-%x}:A:h}
|
||||||
# VCS_STATUS_HAS_CONFLICTED 1 if there are conflicted changes, 0 otherwise.
|
# VCS_STATUS_HAS_CONFLICTED 1 if there are conflicted changes, 0 otherwise.
|
||||||
# VCS_STATUS_HAS_UNSTAGED 1 if there are unstaged changes, 0 if there aren't, -1 if
|
# VCS_STATUS_HAS_UNSTAGED 1 if there are unstaged changes, 0 if there aren't, -1 if
|
||||||
# unknown.
|
# unknown.
|
||||||
|
# VCS_STATUS_NUM_STAGED_NEW The number of staged new files. Note that renamed files
|
||||||
|
# are reported as deleted plus new.
|
||||||
|
# VCS_STATUS_NUM_STAGED_DELETED The number of staged deleted files. Note that renamed files
|
||||||
|
# are reported as deleted plus new.
|
||||||
# VCS_STATUS_NUM_UNSTAGED_DELETED The number of unstaged deleted files. Note that renamed files
|
# VCS_STATUS_NUM_UNSTAGED_DELETED The number of unstaged deleted files. Note that renamed files
|
||||||
# are reported as deleted plus added.
|
# are reported as deleted plus new.
|
||||||
# VCS_STATUS_HAS_UNTRACKED 1 if there are untracked files, 0 if there aren't, -1 if
|
# VCS_STATUS_HAS_UNTRACKED 1 if there are untracked files, 0 if there aren't, -1 if
|
||||||
# unknown.
|
# unknown.
|
||||||
# VCS_STATUS_COMMITS_AHEAD Number of commits the current branch is ahead of upstream.
|
# VCS_STATUS_COMMITS_AHEAD Number of commits the current branch is ahead of upstream.
|
||||||
|
@ -219,7 +225,9 @@ function _gitstatus_process_response() {
|
||||||
typeset -gi VCS_STATUS_COMMITS_BEHIND="${resp[16]}"
|
typeset -gi VCS_STATUS_COMMITS_BEHIND="${resp[16]}"
|
||||||
typeset -gi VCS_STATUS_STASHES="${resp[17]}"
|
typeset -gi VCS_STATUS_STASHES="${resp[17]}"
|
||||||
typeset -g VCS_STATUS_TAG="${resp[18]}"
|
typeset -g VCS_STATUS_TAG="${resp[18]}"
|
||||||
typeset -gi VCS_STATUS_NUM_UNSTAGED_DELETED="${resp[19]:-0}"
|
typeset -gi VCS_STATUS_NUM_UNSTAGED_DELETED="${resp[19]}"
|
||||||
|
typeset -gi VCS_STATUS_NUM_STAGED_NEW="${resp[20]:-0}"
|
||||||
|
typeset -gi VCS_STATUS_NUM_STAGED_DELETED="${resp[21]:-0}"
|
||||||
typeset -gi VCS_STATUS_HAS_STAGED=$((VCS_STATUS_NUM_STAGED > 0))
|
typeset -gi VCS_STATUS_HAS_STAGED=$((VCS_STATUS_NUM_STAGED > 0))
|
||||||
(( dirty_max_index_size >= 0 && VCS_STATUS_INDEX_SIZE > dirty_max_index_size )) && {
|
(( dirty_max_index_size >= 0 && VCS_STATUS_INDEX_SIZE > dirty_max_index_size )) && {
|
||||||
typeset -gi VCS_STATUS_HAS_UNSTAGED=-1
|
typeset -gi VCS_STATUS_HAS_UNSTAGED=-1
|
||||||
|
@ -253,6 +261,8 @@ function _gitstatus_process_response() {
|
||||||
unset VCS_STATUS_STASHES
|
unset VCS_STATUS_STASHES
|
||||||
unset VCS_STATUS_TAG
|
unset VCS_STATUS_TAG
|
||||||
unset VCS_STATUS_NUM_UNSTAGED_DELETED
|
unset VCS_STATUS_NUM_UNSTAGED_DELETED
|
||||||
|
unset VCS_STATUS_NUM_STAGED_NEW
|
||||||
|
unset VCS_STATUS_NUM_STAGED_DELETED
|
||||||
}
|
}
|
||||||
|
|
||||||
(( ! ours )) && (( #header )) && emulate -L zsh && "${header[@]}" || true
|
(( ! ours )) && (( #header )) && emulate -L zsh && "${header[@]}" || true
|
||||||
|
|
Loading…
Reference in a new issue