prompt: fix untracked files for zsh

We signal presense of untracked files by adding a per-cent sign '%' to the prompt. But because '%' is used as an escape character to introduce prompt customization in zsh (just like bash prompt uses '\' to escape '\u', '\h', etc.), we need to say '%%' to get a literal per-cent. Helped-by: Andreas Schwab <schwab@linux-m68k.org> Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Felipe Contreras committed Apr 21, 2013 at 15:00 UTC 24b6132e571bf2e27536d42022f8c0733034d880
1 file changed +1 -1
contrib/completion/git-prompt.sh
+1 -1
@@ -338,7 +338,7 @@ __git_ps1 ()
338 [ "$(git config --bool bash.showUntrackedFiles)" != "false" ] &&
339 [ -n "$(git ls-files --others --exclude-standard)" ]
340 then
341 - u="%"
341 + u="%${ZSH_VERSION+%}"
342 fi
343
344 if [ -n "${GIT_PS1_SHOWUPSTREAM-}" ]; then