From 9bdc5173f0bc514d0b76165d45729622b2ad4d89 Mon Sep 17 00:00:00 2001 From: Cody A Taylor Date: Thu, 12 Mar 2015 19:24:50 -0700 Subject: git prompt: use toplevel to find untracked files MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The __git_ps1() prompt function would not show an untracked state when all the untracked files are outside the current working directory. Signed-off-by: Cody A Taylor Helped-by: SZEDER Gábor Signed-off-by: Junio C Hamano --- contrib/completion/git-prompt.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'contrib') diff --git a/contrib/completion/git-prompt.sh b/contrib/completion/git-prompt.sh index 9d684b10a6..10c4d0ad74 100644 --- a/contrib/completion/git-prompt.sh +++ b/contrib/completion/git-prompt.sh @@ -474,7 +474,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 --error-unmatch -- ':/*' >/dev/null 2>/dev/null then u="%${ZSH_VERSION+%}" fi -- cgit v1.2.1