Re: [PATCH] fix global bash variable leak on __gitcompappend
- From
SZEDER Gábor <szeder@ira.uka.de>
- Date
- Apr 9, 2015, 08:55 UTC
- Message-ID
- <20150409105500.Horde.LF_geolXws6AivFm4yBs0w7@webmail.informatik.kit.edu>
- In-Reply-To
- <xmqqiod6ar9v.fsf@gitster.dls.corp.google.com>
Quoting Junio C Hamano <gitster@pobox.com>:
Show 26 quoted lines
> "Márcio Almada" <marcio.web2@gmail.com> writes:
>
>> ---
>> contrib/completion/git-completion.bash | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> Nicely found and corrected. Please sign-off your patch and Cc area
> experts if you can find them (I'll do that this time for you).
>
> Thanks.
>
>>
>> diff --git a/contrib/completion/git-completion.bash
>> b/contrib/completion/git-completion.bash
>> index 661a829..1620546 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"Looks good and obviously correct, imho even at -rc2 time.
Not sure whether it's maint-worthy, but just in case: it was introduced in v1.8.3-rc0~59^2~2.