summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2015-04-27 12:23:51 -0700
committerJunio C Hamano <gitster@pobox.com>2015-04-27 12:23:51 -0700
commit89ba311df399d27a962b273e1acd95a38af2c821 (patch)
treeda899720183a80f1f7a816c6eba8982d675826fe
parent631f6f1d47cc51a46c8ab48ea1178ea04cff0b8a (diff)
parent852ff1c362b9e92f4bc08997c4837c6190d6e530 (diff)
downloadgit-89ba311df399d27a962b273e1acd95a38af2c821.tar.gz
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
-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"