summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2015-04-20 15:28:29 -0700
committerJunio C Hamano <gitster@pobox.com>2015-04-20 15:28:30 -0700
commit6b1258b07b8ad5671f36bf7e998e905a0142c223 (patch)
tree469cd8f19e72f6977f66324d55705ecd427b7821
parent1eb0545cce4a4ed652425798b87cb0e777c03b3f (diff)
parent852ff1c362b9e92f4bc08997c4837c6190d6e530 (diff)
downloadgit-6b1258b07b8ad5671f36bf7e998e905a0142c223.tar.gz
Merge branch 'ma/bash-completion-leaking-x'
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 fbe597232c..5944c824ab 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"