Merge branch 'bc/fix-array-syntax-for-3.0-in-completion-bash'
authorJunio C Hamano <gitster@pobox.com>
Mon, 28 Jan 2013 18:59:07 +0000 (10:59 -0800)
committerJunio C Hamano <gitster@pobox.com>
Mon, 28 Jan 2013 18:59:07 +0000 (10:59 -0800)
Fix use of an array notation that older versions of bash do not
understand.

* bc/fix-array-syntax-for-3.0-in-completion-bash:
git-completion.bash: replace zsh notation that breaks bash 3.X

1  2 
contrib/completion/git-completion.bash
index 7147d64af20f8db8daa65958d68adb0802605303,2f994200557b3e2e440d5be55f8526a197ae6269..8c49ce25443c531fb11243d8faf19010a209e970
@@@ -397,7 -397,7 +397,7 @@@ __git_complete_revlist_file (
                *)   pfx="$ref:$pfx" ;;
                esac
  
 -              __gitcomp_nl "$(git --git-dir="$(__gitdir)" ls-tree "$ls" \
 +              __gitcomp_nl "$(git --git-dir="$(__gitdir)" ls-tree "$ls" 2>/dev/null \
                                | sed '/^100... blob /{
                                           s,^.*        ,,
                                           s,$, ,
@@@ -563,7 -563,6 +563,7 @@@ __git_list_porcelain_commands (
                archimport)       : import;;
                cat-file)         : plumbing;;
                check-attr)       : plumbing;;
 +              check-ignore)     : plumbing;;
                check-ref-format) : plumbing;;
                checkout-index)   : plumbing;;
                commit-tree)      : plumbing;;
@@@ -2432,7 -2431,7 +2432,7 @@@ if [[ -n ${ZSH_VERSION-} ]]; the
                                --*=*|*.) ;;
                                *) c="$c " ;;
                                esac
-                               array+=("$c")
+                               array[$#array+1]="$c"
                        done
                        compset -P '*[=:]'
                        compadd -Q -S '' -p "${2-}" -a -- array && _ret=0