aboutsummaryrefslogtreecommitdiff
path: root/gitstatus.plugin.sh
diff options
context:
space:
mode:
authorRoman Perepelitsa <roman.perepelitsa@gmail.com>2021-11-02 09:23:57 +0300
committerRoman Perepelitsa <roman.perepelitsa@gmail.com>2021-11-02 09:23:57 +0300
commite2447322e0be4eddb84196f05952f91fa3c6f37e (patch)
tree034170029d62bc07d9ad1cc25f3f1ac41abd984f /gitstatus.plugin.sh
parent1af638543631f2e7db64829c7412ed007047fa81 (diff)
Squashed 'gitstatus/' changes from eaf430112..e26996460
e26996460 survive broken shasum b1825b29a make bash bindings work with nounset git-subtree-dir: gitstatus git-subtree-split: e269964607042ef0fdbda2d7af74ef9c8f618cf4
Diffstat (limited to 'gitstatus.plugin.sh')
-rw-r--r--gitstatus.plugin.sh7
1 files changed, 3 insertions, 4 deletions
diff --git a/gitstatus.plugin.sh b/gitstatus.plugin.sh
index 9a75cb5f..0c660967 100644
--- a/gitstatus.plugin.sh
+++ b/gitstatus.plugin.sh
@@ -53,9 +53,8 @@ function gitstatus_start() {
fi
unset OPTIND
- local opt timeout=5 max_dirty=-1 ttl=3600 extra_flags
+ local opt timeout=5 max_dirty=-1 ttl=3600 extra_flags=
local max_num_staged=1 max_num_unstaged=1 max_num_conflicted=1 max_num_untracked=1
- local ignore_status_show_untracked_files
while getopts "t:s:u:c:d:m:r:eUWD" opt; do
case "$opt" in
t) timeout=$OPTARG;;
@@ -356,7 +355,7 @@ function gitstatus_stop() {
# shell or the call had failed.
function gitstatus_query() {
unset OPTIND
- local opt dir timeout=() no_diff=0
+ local opt dir= timeout=() no_diff=0
while getopts "d:c:t:p" opt "$@"; do
case "$opt" in
d) dir=$OPTARG;;
@@ -367,7 +366,7 @@ function gitstatus_query() {
done
(( OPTIND == $# + 1 )) || { echo "usage: gitstatus_query [OPTION]..." >&2; return 1; }
- [[ -n "$GITSTATUS_DAEMON_PID" ]] || return # not started
+ [[ -n "${GITSTATUS_DAEMON_PID-}" ]] || return # not started
local req_id="$RANDOM.$RANDOM.$RANDOM.$RANDOM"
if [[ -z "${GIT_DIR:-}" ]]; then