Fix extreme slowdown rendering git prompt with multiple untracked files

This commit is contained in:
hurin 2015-10-25 12:58:34 +08:00 committed by pik
parent 30c1ff9d8e
commit 5b88c7303c

View File

@ -322,7 +322,7 @@ function __bobthefish_prompt_git -a current_dir -d 'Display the actual git state
set -l new '' set -l new ''
set -l show_untracked (git config --bool bash.showUntrackedFiles) set -l show_untracked (git config --bool bash.showUntrackedFiles)
if [ "$theme_display_git_untracked" != 'no' -a "$show_untracked" != 'false' ] if [ "$theme_display_git_untracked" != 'no' -a "$show_untracked" != 'false' ]
set new (command git ls-files --other --exclude-standard) set new (command git ls-files --other --exclude-standard --directory)
if [ "$new" ] if [ "$new" ]
if [ "$theme_avoid_ambiguous_glyphs" = 'yes' ] if [ "$theme_avoid_ambiguous_glyphs" = 'yes' ]
set new '...' set new '...'