From 8e1dbc1870953702c8bd6a7967aeae546a8552a3 Mon Sep 17 00:00:00 2001 From: Ilan Cosman Date: Sun, 4 Apr 2021 20:04:09 -0700 Subject: [PATCH] Add --no-optional-locks to background git status --- functions/_tide_item_git.fish | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/functions/_tide_item_git.fish b/functions/_tide_item_git.fish index 0736a05..b19e3cd 100644 --- a/functions/_tide_item_git.fish +++ b/functions/_tide_item_git.fish @@ -46,10 +46,10 @@ function _tide_item_git test "$upstreamAhead" = 0 && set -e upstreamAhead # Git status/stash - test "$isInsideGitDir" = true && set -l gitOptions "-C $gitDir/.." + test "$isInsideGitDir" = true && set -l gitSetDirOption "-C $gitDir/.." - set -l gitInfo (git $gitOptions status --porcelain) - set -l stash (git $gitOptions stash list | count) || set -e stash + set -l gitInfo (git $gitSetDirOption --no-optional-locks status --porcelain) + set -l stash (git $gitSetDirOption stash list | count) || set -e stash set -l conflicted (string match --regex '^UU' $gitInfo | count) || set -e conflicted set -l staged (string match --regex '^[ADMR].' $gitInfo | count) || set -e staged set -l dirty (string match --regex '^.[ADMR]' $gitInfo | count) || set -e dirty