Merge branch 'bc/fix-array-syntax-for-3.0-in-completion-bash' into maint
authorJunio C Hamano <gitster@pobox.com>
Mon, 4 Feb 2013 18:03:13 +0000 (10:03 -0800)
committerJunio C Hamano <gitster@pobox.com>
Mon, 4 Feb 2013 18:03:13 +0000 (10:03 -0800)
Command line completion code was inadvertently made incompatible with
older versions of bash by using a newer array notation.

* 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 14dd5e7ca272350b3fa13d6fc8da3ccb46e12227,2f994200557b3e2e440d5be55f8526a197ae6269..468c96c4a214b4572327a682ddbd7cb9d96aa008
@@@ -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,$, ,
@@@ -2431,7 -2431,7 +2431,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