diff options
author | romkatv <roman.perepelitsa@gmail.com> | 2019-07-04 15:07:42 +0300 |
---|---|---|
committer | romkatv <roman.perepelitsa@gmail.com> | 2019-07-04 15:07:42 +0300 |
commit | fa5aedcf9e244c7deecd034ec01da34bcacde362 (patch) | |
tree | 83579b6cb6655709f67cfd004779182cf0013fc6 /gitstatus | |
parent | c3990c53a940a382194ad901ba1bdadbcc8994ac (diff) |
pull upstream changes from gitstatus
Diffstat (limited to 'gitstatus')
-rwxr-xr-x | gitstatus/bin/gitstatusd-darwin-x86_64 | bin | 1144764 -> 2069120 bytes | |||
-rw-r--r-- | gitstatus/gitstatus.plugin.zsh | 12 |
2 files changed, 8 insertions, 4 deletions
diff --git a/gitstatus/bin/gitstatusd-darwin-x86_64 b/gitstatus/bin/gitstatusd-darwin-x86_64 Binary files differindex e234bb9c..02c84400 100755 --- a/gitstatus/bin/gitstatusd-darwin-x86_64 +++ b/gitstatus/bin/gitstatusd-darwin-x86_64 diff --git a/gitstatus/gitstatus.plugin.zsh b/gitstatus/gitstatus.plugin.zsh index e5bd86c4..73488330 100644 --- a/gitstatus/gitstatus.plugin.zsh +++ b/gitstatus/gitstatus.plugin.zsh @@ -268,7 +268,10 @@ function gitstatus_start() { local -i stderr_fd=-1 lock_fd=-1 req_fd=-1 resp_fd=-1 daemon_pid=-1 function gitstatus_start_impl() { - [[ ${GITSTATUS_ENABLE_LOGGING:-0} != 1 ]] || { + local log_level=${GITSTATUS_LOG_LEVEL:-} + [[ -n $log_level || ${GITSTATUS_ENABLE_LOGGING:-0} != 1 ]] || log_level=INFO + + [[ -z $log_level ]] || { xtrace_file=$(mktemp "${TMPDIR:-/tmp}"/gitstatus.$$.xtrace.XXXXXXXXXX) typeset -g GITSTATUS_XTRACE_${name}=$xtrace_file exec {stderr_fd}>&2 2>$xtrace_file @@ -291,7 +294,7 @@ function gitstatus_start() { resp_fifo=$(mktemp -u "${TMPDIR:-/tmp}"/gitstatus.$$.pipe.resp.XXXXXXXXXX) mkfifo $resp_fifo - [[ ${GITSTATUS_ENABLE_LOGGING:-0} == 1 ]] && + [[ -n $log_level ]] && log_file=$(mktemp "${TMPDIR:-/tmp}"/gitstatus.$$.daemon-log.XXXXXXXXXX) || log_file=/dev/null typeset -g GITSTATUS_DAEMON_LOG_${name}=$log_file @@ -313,7 +316,8 @@ function gitstatus_start() { --max-num-staged=${(q)max_num_staged} --max-num-unstaged=${(q)max_num_unstaged} --max-num-untracked=${(q)max_num_untracked} - --dirty-max-index-size=${(q)dirty_max_index_size}) + --dirty-max-index-size=${(q)dirty_max_index_size} + ${${log_level:#INFO}:+--log-level=$log_level}) # We use `zsh -c` instead of plain {} or () to work around bugs in zplug. It hangs on startup. zsh -dfxc " @@ -397,7 +401,7 @@ function gitstatus_start() { >&2 awk '{print " " $0}' <$log_file >&2 print -nP '%f' fi - if [[ ${GITSTATUS_ENABLE_LOGGING:-0} == 1 ]]; then + if [[ -n ${GITSTATUS_LOG_LEVEL:-} || ${GITSTATUS_ENABLE_LOGGING:-0} == 1 ]]; then >&2 echo -E '' >&2 echo -E ' Your system information:' >&2 print -P '%F{yellow}' |