mirror of
https://github.com/romkatv/powerlevel10k.git
synced 2024-12-22 15:21:56 +00:00
pull upstream changes from gitstatus
This commit is contained in:
parent
d9505ef195
commit
69253953f9
5 changed files with 4 additions and 4 deletions
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -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…
Reference in a new issue