bash prompt: remove a redundant 'git diff' option
[gitweb.git] / contrib / completion / git-prompt.sh
index 366f0bc1e9b5597f1714574700452cd241c14f8d..7a95fbdcfdbedac1aa4c06b720a356a41fd0b356 100644 (file)
@@ -476,7 +476,7 @@ __git_ps1 ()
                if [ -n "${GIT_PS1_SHOWDIRTYSTATE-}" ] &&
                   [ "$(git config --bool bash.showDirtyState)" != "false" ]
                then
-                       git diff --no-ext-diff --quiet --exit-code || w="*"
+                       git diff --no-ext-diff --quiet || w="*"
                        if [ -n "$short_sha" ]; then
                                git diff-index --cached --quiet HEAD -- || i="+"
                        else
@@ -491,7 +491,7 @@ __git_ps1 ()
 
                if [ -n "${GIT_PS1_SHOWUNTRACKEDFILES-}" ] &&
                   [ "$(git config --bool bash.showUntrackedFiles)" != "false" ] &&
-                  git ls-files --others --exclude-standard --error-unmatch -- ':/*' >/dev/null 2>/dev/null
+                  git ls-files --others --exclude-standard --directory --no-empty-directory --error-unmatch -- ':/*' >/dev/null 2>/dev/null
                then
                        u="%${ZSH_VERSION+%}"
                fi