mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-02-21 07:47:09 +08: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
@ -383,7 +383,7 @@ function __fish_git_prompt --description "Prompt function for Git"
|
||||
if set -q __fish_git_prompt_showuntrackedfiles
|
||||
set -l config (command git config --bool bash.showUntrackedFiles)
|
||||
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
|
||||
end
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user