git-completion.bash: replace zsh notation that breaks bash 3.X

50c5885e (git-completion.bash: replace zsh notation that breaks bash
3.X, 2013-01-18) fixed a zsh-ism introduced earlier to append to an
array, which older versions of bash (3.0) did not grok.  This was
again broken by 734b2f05 (completion: synchronize zsh wrapper,
2013-05-08).

Cherry-pick the fix again to let those with older bash use the
completion script.

Signed-off-by: Brandon Casey <drafnel@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Brandon Casey 2013-01-18 11:24:01 -08:00 committed by Junio C Hamano
parent 6bf931a54f
commit e78095c3d0

View File

@ -2663,7 +2663,7 @@ if [[ -n ${ZSH_VERSION-} ]]; then
--*=*|*.) ;; --*=*|*.) ;;
*) c="$c " ;; *) c="$c " ;;
esac esac
array+=("$c") array[$#array+1]="$c"
done done
compset -P '*[=:]' compset -P '*[=:]'
compadd -Q -S '' -p "${2-}" -a -- array && _ret=0 compadd -Q -S '' -p "${2-}" -a -- array && _ret=0