1
0
Fork 0
mirror of https://github.com/romkatv/powerlevel10k.git synced 2024-11-17 10:10:07 +00:00

pull upstream changes from gitstatus

This commit is contained in:
romkatv 2019-11-21 21:12:51 +01:00
parent fdb90994c9
commit 2d32241c20

View file

@ -160,13 +160,11 @@ function gitstatus_query() {
local client_pid_var=_GITSTATUS_CLIENT_PID_${name} local client_pid_var=_GITSTATUS_CLIENT_PID_${name}
[[ ${(P)client_pid_var} == $$ ]] [[ ${(P)client_pid_var} == $$ ]]
if [[ -z ${GIT_DIR:-} ]]; then [[ -z ${GIT_DIR:-} ]] && {
[[ $dir == /* ]] || dir=${(%):-%/}/$dir [[ $dir == /* ]] || dir=${(%):-%/}/$dir
elif [[ $GIT_DIR == /* ]]; then } || {
dir=:$GIT_DIR [[ $GIT_DIR == /* ]] && dir=:$GIT_DIR || dir=:${(%):-%/}/$GIT_DIR
else }
dir=:${(%):-%/}/$GIT_DIR
fi
local req_fd_var=_GITSTATUS_REQ_FD_${name} local req_fd_var=_GITSTATUS_REQ_FD_${name}
local -i req_fd=${(P)req_fd_var} local -i req_fd=${(P)req_fd_var}