Suppress git prompt CRLF warnings noise

Drawing prompt in repo with text=auto attribute and mixed line endings in files was spawning crlf conversion warnings to terminal from unsilenced stderr of git diff
This commit is contained in:
oddwheel 2017-09-22 19:43:27 +03:00 committed by Fabian Homborg
parent 25d83ed0d7
commit a05bcc6a63

View file

@ -475,7 +475,7 @@ set -g ___fish_git_prompt_status_order stagedstate invalidstate dirtystate untra
function __fish_git_prompt_informative_status
set -l changedFiles (command git diff --name-status | string match -r \\w)
set -l changedFiles (command git diff --name-status ^/dev/null | string match -r \\w)
set -l stagedFiles (command git diff --staged --name-status | string match -r \\w)
set -l x (count $changedFiles)