Code

Merge branch 'am/completion-zsh-fix'
authorJunio C Hamano <gitster@pobox.com>
Fri, 23 Mar 2012 21:36:21 +0000 (14:36 -0700)
committerJunio C Hamano <gitster@pobox.com>
Fri, 23 Mar 2012 21:36:21 +0000 (14:36 -0700)
* am/completion-zsh-fix:
  contrib/completion: "local var=()" is misinterpreted as func-decl by zsh

contrib/completion/git-completion.bash

index fba076dde27440eaa90fd4fcfdfa55764410dd11..31f714da927511fb5b2b7ac11dd7af1e3f98ae76 100755 (executable)
@@ -94,9 +94,10 @@ __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
        local output="$(git config -z --get-regexp '^(svn-remote\..*\.url|bash\.showupstream)$' 2>/dev/null | tr '\0\n' '\n ')"
        while read -r key value; do