diff options
author | Brian Gernhardt <brian@gernhardtsoftware.com> | 2013-07-03 01:40:08 -0400 |
---|---|---|
committer | Brian Gernhardt <brian@gernhardtsoftware.com> | 2013-07-26 22:05:07 -0400 |
commit | 6faeb71770ff158984a7edffa8c8de62b065cccc (patch) | |
tree | 3ece1460b744c2ce65072ca4bb61fa2d27b1b702 /share/functions/__fish_git_prompt.fish | |
parent | d534b0ba81f81ef23868878fdfa822f1bcee91b2 (diff) |
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"
Diffstat (limited to 'share/functions/__fish_git_prompt.fish')
-rw-r--r-- | share/functions/__fish_git_prompt.fish | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/share/functions/__fish_git_prompt.fish b/share/functions/__fish_git_prompt.fish index 2a44765c..f0bc022a 100644 --- a/share/functions/__fish_git_prompt.fish +++ b/share/functions/__fish_git_prompt.fish @@ -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 |