]> git.ipfire.org Git - thirdparty/git.git/commitdiff
completion: fix global bash variable leak on __gitcompappend
authorMárcio Almada <marcio.web2@gmail.com>
Wed, 8 Apr 2015 05:45:58 +0000 (02:45 -0300)
committerJunio C Hamano <gitster@pobox.com>
Mon, 13 Apr 2015 05:35:51 +0000 (22:35 -0700)
Signed-off-by: Junio C Hamano <gitster@pobox.com>
contrib/completion/git-completion.bash

index 019026efcbc5876d7aa3890eab5078a8bfbe2f7c..2504fb605b1010d725437e09c580315859510489 100644 (file)
@@ -180,7 +180,7 @@ fi
 
 __gitcompappend ()
 {
-       local i=${#COMPREPLY[@]}
+       local i=${#COMPREPLY[@]}
        for x in $1; do
                if [[ "$x" == "$3"* ]]; then
                        COMPREPLY[i++]="$2$x$4"