Merge branch 'as/sparse-checkout-removal'
[gitweb.git] / contrib / completion / git-prompt.sh
index 366f0bc1e9b5597f1714574700452cd241c14f8d..07b52bedf183231b5708caf1ce255a115c9a980c 100644 (file)
@@ -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