aboutsummaryrefslogtreecommitdiff
path: root/gitstatus/gitstatus.plugin.zsh
diff options
context:
space:
mode:
authorRoman Perepelitsa <roman.perepelitsa@gmail.com>2020-07-19 12:09:40 +0300
committerRoman Perepelitsa <roman.perepelitsa@gmail.com>2020-07-19 12:09:40 +0300
commit24278ccd391534011a15047b27ee2139176db426 (patch)
tree2333f4999e537a3faeb71f11c6c59298514a9e71 /gitstatus/gitstatus.plugin.zsh
parent6dfd92f8c1d60892ea9b2a57e93cd22a8cb75c2a (diff)
parentbf2aa14becccd2b55180bc2aeff44d3a6015a580 (diff)
Merge commit 'bf2aa14becccd2b55180bc2aeff44d3a6015a580'
Diffstat (limited to 'gitstatus/gitstatus.plugin.zsh')
-rw-r--r--gitstatus/gitstatus.plugin.zsh10
1 files changed, 8 insertions, 2 deletions
diff --git a/gitstatus/gitstatus.plugin.zsh b/gitstatus/gitstatus.plugin.zsh
index 46861e32..55301ab1 100644
--- a/gitstatus/gitstatus.plugin.zsh
+++ b/gitstatus/gitstatus.plugin.zsh
@@ -168,13 +168,13 @@ function gitstatus_query"${1:-}"() {
done
if (( OPTIND != ARGC )); then
- print -ru2 -- "gitstatus_start: exactly one positional argument is required"
+ print -ru2 -- "gitstatus_query: exactly one positional argument is required"
return 1
fi
local name=$*[OPTIND]
if [[ $name != [[:IDENT:]]## ]]; then
- print -ru2 -- "gitstatus_start: invalid positional argument: $name"
+ print -ru2 -- "gitstatus_query: invalid positional argument: $name"
return 1
fi
@@ -186,6 +186,12 @@ function gitstatus_query"${1:-}"() {
[[ $GIT_DIR == /* ]] && dir=:$GIT_DIR || dir=:${(%):-%/}/$GIT_DIR
fi
+ if [[ $dir != (|:)/* ]]; then
+ typeset -g VCS_STATUS_RESULT=norepo-sync
+ _gitstatus_clear$fsuf
+ return 0
+ fi
+
local -i req_fd=${(P)${:-_GITSTATUS_REQ_FD_$name}}
local req_id=$EPOCHREALTIME
print -rnu $req_fd -- $req_id' '$callback$'\x1f'$dir$'\x1f'$no_diff$'\x1e' || return