From 1eceb3a264b3682a0a688ccbab351f0410e6d7f9 Mon Sep 17 00:00:00 2001 From: Von Random Date: Sun, 21 Aug 2022 04:43:39 +0300 Subject: [PATCH] zsh: rely on locks from git --- zsh/prompt-powerline.zsh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/zsh/prompt-powerline.zsh b/zsh/prompt-powerline.zsh index bb06472..661bbb7 100644 --- a/zsh/prompt-powerline.zsh +++ b/zsh/prompt-powerline.zsh @@ -109,7 +109,7 @@ precmd.prompt.ro() { } precmd.is_git_repo() { - typeset -g prompt_git_dir + typeset prompt_git_dir prompt_git_dir=$(git rev-parse --git-dir 2>/dev/null) || return 1 [[ ! -e $prompt_git_dir/nozsh ]] } @@ -120,7 +120,7 @@ precmd.prompt.pre_git() { precmd.prompt.git() { typeset raw_status - raw_status=$(flock -n $prompt_git_dir git --no-optional-locks status --porcelain -bu 2>/dev/null) || return 0 + raw_status=$(git status --porcelain -bu 2>/dev/null) || return 0 typeset -A count typeset branch_status git_status_string IFS=