Skip to content

Commit

Permalink
Merge branch 'ma/bash-completion-leaking-x'
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Junio C Hamano committed Apr 20, 2015
2 parents 1eb0545 + 852ff1c commit 6b1258b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion contrib/completion/git-completion.bash
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 6b1258b

Please sign in to comment.