{"thread":{"id":"39033","subject":"[PATCH] fix global bash variable on __gitcompappend","startedAt":"2015-04-08T05:45:57Z","lastAt":"2015-04-09T19:26:50Z","messageCount":6,"participants":["Márcio Almada","Junio C Hamano","SZEDER Gábor","Marcio Almada","Eric Sunshine"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"259163","messageId":"1428471958-12339-1-git-send-email-marcio3w@gmail.com","threadId":"39033","inReplyTo":null,"subject":"[PATCH] fix global bash variable on __gitcompappend","fromName":"Márcio Almada","fromEmail":"marcio.web2@gmail.com","sentAt":"2015-04-08T05:45:57Z","receivedAt":"2015-04-08T05:45:57Z","isPatch":true,"sender":{"key":"marcio.web2@gmail.com","avatar":"https://avatars.githubusercontent.com/u/227395?v=4"},"body":"Hi,\n\nThis is how to reproduce the bug:\n\n```\ngit checkout [tab-tab]\necho $x # outputs the name of the last branch on completion list\n```\n\nOr more directly:\n\n```\n__gitcompappend \"something\"\necho $x # outputs 'something'\n```\n\nMight not be a big deal, but it's annoying to know that `$x` is lurking.\n\nMárcio Almada (1):\n  fix global bash variable leak on __gitcompappend\n\n contrib/completion/git-completion.bash | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\n-- \n1.9.3\n"},{"id":"259164","messageId":"1428471958-12339-2-git-send-email-marcio3w@gmail.com","threadId":"39033","inReplyTo":"1428471958-12339-1-git-send-email-marcio3w@gmail.com","subject":"[PATCH] fix global bash variable leak on __gitcompappend","fromName":"Márcio Almada","fromEmail":"marcio.web2@gmail.com","sentAt":"2015-04-08T05:45:58Z","receivedAt":"2015-04-08T05:45:58Z","isPatch":true,"sender":{"key":"marcio.web2@gmail.com","avatar":"https://avatars.githubusercontent.com/u/227395?v=4"},"body":"---\n contrib/completion/git-completion.bash | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash\nindex 661a829..1620546 100644\n--- a/contrib/completion/git-completion.bash\n+++ b/contrib/completion/git-completion.bash\n@@ -186,7 +186,7 @@ fi\n \n __gitcompappend ()\n {\n-\tlocal i=${#COMPREPLY[@]}\n+\tlocal x i=${#COMPREPLY[@]}\n \tfor x in $1; do\n \t\tif [[ \"$x\" == \"$3\"* ]]; then\n \t\t\tCOMPREPLY[i++]=\"$2$x$4\"\n-- \n1.9.3\n"},{"id":"259197","messageId":"xmqqiod6ar9v.fsf@gitster.dls.corp.google.com","threadId":"39033","inReplyTo":"1428471958-12339-2-git-send-email-marcio3w@gmail.com","subject":"Re: [PATCH] fix global bash variable leak on __gitcompappend","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2015-04-09T03:56:28Z","receivedAt":"2015-04-09T03:56:28Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Márcio Almada\" <marcio.web2@gmail.com> writes:\n\n> ---\n>  contrib/completion/git-completion.bash | 2 +-\n>  1 file changed, 1 insertion(+), 1 deletion(-)\n\nNicely found and corrected.  Please sign-off your patch and Cc area\nexperts if you can find them (I'll do that this time for you).\n\nThanks.\n\n>\n> diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash\n> index 661a829..1620546 100644\n> --- a/contrib/completion/git-completion.bash\n> +++ b/contrib/completion/git-completion.bash\n> @@ -186,7 +186,7 @@ fi\n>  \n>  __gitcompappend ()\n>  {\n> -\tlocal i=${#COMPREPLY[@]}\n> +\tlocal x i=${#COMPREPLY[@]}\n>  \tfor x in $1; do\n>  \t\tif [[ \"$x\" == \"$3\"* ]]; then\n>  \t\t\tCOMPREPLY[i++]=\"$2$x$4\"\n"},{"id":"259202","messageId":"20150409105500.Horde.LF_geolXws6AivFm4yBs0w7@webmail.informatik.kit.edu","threadId":"39033","inReplyTo":"xmqqiod6ar9v.fsf@gitster.dls.corp.google.com","subject":"Re: [PATCH] fix global bash variable leak on __gitcompappend","fromName":"SZEDER Gábor","fromEmail":"szeder@ira.uka.de","sentAt":"2015-04-09T08:55:00Z","receivedAt":"2015-04-09T08:55:00Z","isPatch":true,"sender":{"key":"szeder.dev@gmail.com","avatar":"https://avatars.githubusercontent.com/u/116324?v=4"},"body":"\nQuoting Junio C Hamano <gitster@pobox.com>:\n\n> \"Márcio Almada\" <marcio.web2@gmail.com> writes:\n>\n>> ---\n>>  contrib/completion/git-completion.bash | 2 +-\n>>  1 file changed, 1 insertion(+), 1 deletion(-)\n>\n> Nicely found and corrected.  Please sign-off your patch and Cc area\n> experts if you can find them (I'll do that this time for you).\n>\n> Thanks.\n>\n>>\n>> diff --git a/contrib/completion/git-completion.bash  \n>> b/contrib/completion/git-completion.bash\n>> index 661a829..1620546 100644\n>> --- a/contrib/completion/git-completion.bash\n>> +++ b/contrib/completion/git-completion.bash\n>> @@ -186,7 +186,7 @@ fi\n>>\n>>  __gitcompappend ()\n>>  {\n>> -\tlocal i=${#COMPREPLY[@]}\n>> +\tlocal x i=${#COMPREPLY[@]}\n>>  \tfor x in $1; do\n>>  \t\tif [[ \"$x\" == \"$3\"* ]]; then\n>>  \t\t\tCOMPREPLY[i++]=\"$2$x$4\"\n\nLooks good and obviously correct, imho even at -rc2 time.\n\nNot sure whether it's maint-worthy, but just in case: it was  \nintroduced in v1.8.3-rc0~59^2~2.\n"},{"id":"259209","messageId":"CAOsHV+tCHrbmapXU+eei7v1jfiwdpK8jT+ue=kb_dm9nDXtq_Q@mail.gmail.com","threadId":"39033","inReplyTo":"xmqqiod6ar9v.fsf@gitster.dls.corp.google.com","subject":"Re: [PATCH] fix global bash variable leak on __gitcompappend","fromName":"Marcio Almada","fromEmail":"marcio.web2@gmail.com","sentAt":"2015-04-09T13:52:52Z","receivedAt":"2015-04-09T13:52:52Z","isPatch":true,"sender":{"key":"marcio.web2@gmail.com","avatar":"https://avatars.githubusercontent.com/u/227395?v=4"},"body":"2015-04-09 0:56 GMT-03:00 Junio C Hamano <gitster@pobox.com>:\n> \"Márcio Almada\" <marcio.web2@gmail.com> writes:\n>\n>> ---\n>>  contrib/completion/git-completion.bash | 2 +-\n>>  1 file changed, 1 insertion(+), 1 deletion(-)\n>\n> Nicely found and corrected.  Please sign-off your patch and Cc area\n> experts if you can find them (I'll do that this time for you).\n>\n> Thanks.\n>\n\nOk, I'll remember this next time. Thanks for your incredible work here.\n\n>>\n>> diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash\n>> index 661a829..1620546 100644\n>> --- a/contrib/completion/git-completion.bash\n>> +++ b/contrib/completion/git-completion.bash\n>> @@ -186,7 +186,7 @@ fi\n>>\n>>  __gitcompappend ()\n>>  {\n>> -     local i=${#COMPREPLY[@]}\n>> +     local x i=${#COMPREPLY[@]}\n>>       for x in $1; do\n>>               if [[ \"$x\" == \"$3\"* ]]; then\n>>                       COMPREPLY[i++]=\"$2$x$4\"\n"},{"id":"259212","messageId":"CAPig+cTE+UbNaY3rewqCFjZW7nAYOTP167W3Bhp4AEZoVBt0tA@mail.gmail.com","threadId":"39033","inReplyTo":"CAOsHV+tCHrbmapXU+eei7v1jfiwdpK8jT+ue=kb_dm9nDXtq_Q@mail.gmail.com","subject":"Re: [PATCH] fix global bash variable leak on __gitcompappend","fromName":"Eric Sunshine","fromEmail":"sunshine@sunshineco.com","sentAt":"2015-04-09T19:26:50Z","receivedAt":"2015-04-09T19:26:50Z","isPatch":true,"sender":{"key":"sunshine@sunshineco.com","avatar":"https://avatars.githubusercontent.com/u/163641?v=4"},"body":"On Thu, Apr 9, 2015 at 9:52 AM, Marcio Almada <marcio.web2@gmail.com> wrote:\n> 2015-04-09 0:56 GMT-03:00 Junio C Hamano <gitster@pobox.com>:\n>> \"Márcio Almada\" <marcio.web2@gmail.com> writes:\n>>>  contrib/completion/git-completion.bash | 2 +-\n>>>  1 file changed, 1 insertion(+), 1 deletion(-)\n>>\n>> Nicely found and corrected.  Please sign-off your patch and Cc area\n>> experts if you can find them (I'll do that this time for you).\n>\n> Ok, I'll remember this next time. Thanks for your incredible work here.\n\nJunio's implication was that you should reply to his message with:\n\n    Signed-off-by: Your Name <your@email>\n\nOr re-send the patch with your sign-off added.\n"}]}