From: Junio C Hamano Date: Mon, 4 Feb 2013 18:03:13 +0000 (-0800) Subject: Merge branch 'bc/fix-array-syntax-for-3.0-in-completion-bash' into maint X-Git-Tag: v1.8.1.3~17 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/5617394f71e3fe1deb67d011d1d1fcb67e95fb3a?ds=inline;hp=-c Merge branch 'bc/fix-array-syntax-for-3.0-in-completion-bash' into maint 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 --- 5617394f71e3fe1deb67d011d1d1fcb67e95fb3a diff --combined contrib/completion/git-completion.bash index 14dd5e7ca2,2f99420055..468c96c4a2 --- a/contrib/completion/git-completion.bash +++ b/contrib/completion/git-completion.bash @@@ -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