git/contrib/completion
Thomas Gummerer d0583da838 prompt: fix show upstream with svn and zsh
Currently the __git_ps1 git prompt gives the following error with a
repository converted by git-svn, when used with zsh:

   __git_ps1_show_upstream:19: bad pattern: svn_remote[
   __git_ps1_show_upstream:45: bad substitution

To reproduce the problem, the __git_ps1_show_upstream function can be
executed in a repository converted with git-svn.  Both those errors are
triggered by spaces after the '['.

Zsh also doesn't support initializing an array with `local var=(...)`.
This triggers the following error:

   __git_ps1_show_upstream:41: bad pattern: svn_upstream=(commit

Use
   local -a
   var=(...)
instead to make is compatible.

This was introduced by 6d158cba (bash completion: Support "divergence
from upstream" messages in __git_ps1), when the script was for bash
only.

Signed-off-by: Thomas Gummerer <t.gummerer@gmail.com>
Acked-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-05-22 10:14:01 -07:00
..
git-completion.bash git-completion.bash: complete branch.*.rebase as boolean 2013-04-29 08:07:23 -07:00
git-completion.tcsh Merge branch 'mk/tcsh-complete-only-known-paths' 2013-02-08 15:28:51 -08:00
git-completion.zsh completion: zsh: don't override suffix on _detault 2013-05-03 15:10:05 -07:00
git-prompt.sh prompt: fix show upstream with svn and zsh 2013-05-22 10:14:01 -07:00