mirror of
https://github.com/fish-shell/fish-shell
synced 2025-01-13 13:39:02 +00:00
git_prompt: don't save output of ls-files for untracked files
based on git.git 14d7649: "bash prompt: avoid command substitution when checking for untracked files"
This commit is contained in:
parent
d534b0ba81
commit
6faeb71770
1 changed files with 1 additions and 2 deletions
|
@ -325,8 +325,7 @@ function __fish_git_prompt --description "Prompt function for Git"
|
|||
|
||||
if test -n "$__fish_git_prompt_showuntrackedfiles"
|
||||
if test (git config --bool bash.showUntrackedFiles) != false
|
||||
set -l files (git ls-files --others --exclude-standard)
|
||||
if test -n "$files"
|
||||
if git ls-files --others --exclude-standard --error-unmatch -- '*' >/dev/null ^/dev/null
|
||||
set u $___fish_git_prompt_char_untrackedfiles
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue