mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-25 20:33:08 +00:00
Speedup git prompt
Fix __fish_git_prompt too slow under repo with lots of untracked files when __fish_git_prompt_showuntrackedfiles enabled.
This commit is contained in:
parent
ff09b8c1ee
commit
0988f53c70
1 changed files with 1 additions and 1 deletions
|
@ -383,7 +383,7 @@ function __fish_git_prompt --description "Prompt function for Git"
|
||||||
if set -q __fish_git_prompt_showuntrackedfiles
|
if set -q __fish_git_prompt_showuntrackedfiles
|
||||||
set -l config (command git config --bool bash.showUntrackedFiles)
|
set -l config (command git config --bool bash.showUntrackedFiles)
|
||||||
if test "$config" != false
|
if test "$config" != false
|
||||||
if command git ls-files --others --exclude-standard --error-unmatch -- '*' >/dev/null ^/dev/null
|
if command git ls-files --others --exclude-standard --directory --no-empty-directory --error-unmatch -- '*' >/dev/null ^/dev/null
|
||||||
set u $___fish_git_prompt_char_untrackedfiles
|
set u $___fish_git_prompt_char_untrackedfiles
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue