[PATCH] Fix git-completion.bash for use in zsh

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Certain versions (or option combinations) of zsh appear to treat
things like
local some_var=()
as a function declaration.  This makes errors appear when using it in
combination with the GIT_PS1_SHOWUPSTREAM option.

Signed-off-by: Alex Merry <dev@xxxxxxxxxxxxxxxx>
---
 contrib/completion/git-completion.bash |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index 5a83090..89de45d 100755
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -106,8 +106,9 @@ __gitdir ()
 __git_ps1_show_upstream ()
 {
        local key value
-       local svn_remote=() svn_url_pattern count n
+       local svn_remote svn_url_pattern count n
        local upstream=git legacy="" verbose=""
+       svn_remote=()

        # get some config options from git-config
        while read key value; do
-- 
1.7.6
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]