Re: [PATCH 4/7] completion: add tests for invalid variable name among completion words

2012-11-18 Thread Felipe Contreras
On Sat, Nov 17, 2012 at 12:05 PM, SZEDER Gábor sze...@ira.uka.de wrote: @@ -155,6 +156,12 @@ test_expect_success '__gitcomp - suffix' ' test_cmp expected out ' +test_expect_failure '__gitcomp - doesnt fail because of invalid variable name' ' + ( + __gitcomp

Re: [PATCH 4/7] completion: add tests for invalid variable name among completion words

2012-11-18 Thread Felipe Contreras
On Sun, Nov 18, 2012 at 12:40 AM, Jonathan Nieder jrnie...@gmail.com wrote: SZEDER Gábor wrote: The breakage can be simply bogus possible completion words, but it can also be a failure: $ git branch '${foo.bar}' $ git checkout TAB

[PATCH 4/7] completion: add tests for invalid variable name among completion words

2012-11-17 Thread SZEDER Gábor
The compgen Bash-builtin performs expansion on all words in the wordlist given to its -W option, breaking Git's completion script in various ways if one of those words can be expanded. The breakage can be simply bogus possible completion words, but it can also be a failure: $ git branch

Re: [PATCH 4/7] completion: add tests for invalid variable name among completion words

2012-11-17 Thread Jonathan Nieder
SZEDER Gábor wrote: The breakage can be simply bogus possible completion words, but it can also be a failure: $ git branch '${foo.bar}' $ git checkout TAB bash: ${foo.bar}: bad substitution Or arbitrary code execution: $