From bf2aa14becccd2b55180bc2aeff44d3a6015a580 Mon Sep 17 00:00:00 2001 From: Roman Perepelitsa Date: Sun, 19 Jul 2020 11:09:39 +0200 Subject: [PATCH] Squashed 'gitstatus/' changes from 89e9ebfd..7546f4de 7546f4de return norepo-sync when cwd does not exist 8ccd4d34 comments git-subtree-dir: gitstatus git-subtree-split: 7546f4def34558e44ee660a9970da80f760e99c8 --- gitstatus.plugin.zsh | 10 ++++++++-- install.info | 4 +++- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/gitstatus.plugin.zsh b/gitstatus.plugin.zsh index 46861e32..55301ab1 100644 --- a/gitstatus.plugin.zsh +++ b/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 diff --git a/install.info b/install.info index 668f3e48..475d9457 100644 --- a/install.info +++ b/install.info @@ -3,7 +3,9 @@ # This file is used by ./install and indirectly by shell bindings. # # The first line is read by powerlevel10k instant prompt. It must -# be updated whenever the content of this file changes. +# be updated whenever the content of this file changes. The actual +# value doesn't matter as long as it's unique. You can use the output +# of `git rev-parse HEAD`. # Official gitstatusd binaries. uname_s_glob="cygwin_nt-10.0"; uname_m_glob="i686"; file="gitstatusd-${uname_s}-${uname_m}"; version="v1.0.0"; sha256="c38342c7a70842067074710250fd8cebea87ae111f032277c2c70a77179b5355";