summaryrefslogtreecommitdiff
path: root/contrib/completion/git-completion.bash
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2015-04-27 12:23:51 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2015-04-27 12:23:51 -0700
commit89ba311df399d27a962b273e1acd95a38af2c821 (patch)
treeda899720183a80f1f7a816c6eba8982d675826fe /contrib/completion/git-completion.bash
parentMerge branch 'jc/push-cert' into maint (diff)
parentcompletion: fix global bash variable leak on __gitcompappend (diff)
downloadtgif-89ba311df399d27a962b273e1acd95a38af2c821.tar.xz
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
Diffstat (limited to 'contrib/completion/git-completion.bash')
-rw-r--r--contrib/completion/git-completion.bash2
1 files changed, 1 insertions, 1 deletions
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"