Skip to content

Commit

Permalink
completion: fix global bash variable leak on __gitcompappend
Browse files Browse the repository at this point in the history
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Márcio Almada authored and Junio C Hamano committed Apr 13, 2015
1 parent 282616c commit 852ff1c
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 @@ -180,7 +180,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 852ff1c

Please sign in to comment.