avoid printing anything in git status until git status is properly finished
This commit is contained in:
parent
c1bf1d5af2
commit
82c1e621dd
1 changed files with 2 additions and 1 deletions
3
zshrc
3
zshrc
|
@ -98,7 +98,8 @@ precmd.is_git_repo() {
|
||||||
precmd.git() {
|
precmd.git() {
|
||||||
precmd.is_git_repo || return 0
|
precmd.is_git_repo || return 0
|
||||||
|
|
||||||
local raw_status="$(flock -w 1 $prompt_state_file git --no-optional-locks status --porcelain -bu 2>/dev/null)"
|
local raw_status="$(flock -w 0 $prompt_state_file git --no-optional-locks status --porcelain -bu 2>/dev/null)"
|
||||||
|
[[ -n $raw_status ]] || return 0
|
||||||
local branch_info full_status git_status= IFS=
|
local branch_info full_status git_status= IFS=
|
||||||
local staged_count=0 unstaged_count=0 untracked_count=0 unmerged_count=0
|
local staged_count=0 unstaged_count=0 untracked_count=0 unmerged_count=0
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue