pull upstream changes from gitstatus

pull/47/head
romkatv 6 years ago
parent d9505ef195
commit 69253953f9

@ -3,7 +3,7 @@
# Retrives status of a git repo from a directory under its working tree.
#
# -d STR Directory to query. Defaults to $PWD. Must be absolute.
# -d STR Directory to query. Defaults to ${${GIT_DIR:-$PWD}:a}. Must be absolute.
# -c STR Callback function to call once the results are available. Called only after
# gitstatus_query returns 0 with VCS_STATUS_RESULT=tout.
# -t FLOAT Timeout in seconds. Will block for at most this long. If no results are
@ -58,7 +58,7 @@ function gitstatus_query() {
setopt err_return no_unset
local opt
local dir=$PWD
local dir=${${GIT_DIR:-$PWD}:a}
local callback=''
local -F timeout=-1
while true; do
@ -215,8 +215,8 @@ function gitstatus_start() {
local -i threads=${GITSTATUS_NUM_THREADS:-0}
(( threads > 0)) || {
case $os in
FreeBSD) threads=$(sysctl -n hw.ncpu);;
*) threads=$(getconf _NPROCESSORS_ONLN);;
FreeBSD) threads=$(( 2 * $(sysctl -n hw.ncpu) ));;
*) threads=$(( 2 * $(getconf _NPROCESSORS_ONLN) ));;
esac
}

Loading…
Cancel
Save