From: Junio C Hamano Date: Mon, 27 Apr 2015 19:23:51 +0000 (-0700) Subject: Merge branch 'ma/bash-completion-leaking-x' into maint X-Git-Tag: v2.3.7~2 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/89ba311df399d27a962b273e1acd95a38af2c821?hp=631f6f1d47cc51a46c8ab48ea1178ea04cff0b8a Merge branch 'ma/bash-completion-leaking-x' into maint The completion script (in contrib/) contaminated global namespace and clobbered on a shell variable $x. * ma/bash-completion-leaking-x: completion: fix global bash variable leak on __gitcompappend --- diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash index 661a8294da..16205467b1 100644 --- a/contrib/completion/git-completion.bash +++ b/contrib/completion/git-completion.bash @@ -186,7 +186,7 @@ fi __gitcompappend () { - local i=${#COMPREPLY[@]} + local x i=${#COMPREPLY[@]} for x in $1; do if [[ "$x" == "$3"* ]]; then COMPREPLY[i++]="$2$x$4"