Skip to content

Commit

Permalink
Merge branch 'ma/bash-completion-leaking-x' into maint
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 27, 2015
2 parents 631f6f1 + 852ff1c commit 89ba311
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 89ba311

Please sign in to comment.