[BUG] ls-files '**' globstar matches one or more directories instead of zero or more directories
- From
- Alistair Buxton <a.j.buxton@gmail.com>
- Date
- Apr 14, 2017, 19:17 UTC
- Message-ID
- <CAO-Op+GujOUuueqwOKbb1NosZ-VYY5KVWm1+HNMC8xhd0ApEDw@mail.gmail.com>
To reproduce, go to any git repository and run:
diff <(git ls-files '**/*' | sort) <(git ls-files | sort)
Expected result: No output since both commands should produce identical output.
Actual result: '**/*' only matches files at least one directory deep.
The same happens with eg '**/Makefile' - only Makefiles in subdirectories are listed.
I have personally tested with 2.7.8 and 2.12.0. Others on IRC report that this happens in the next branch.
-- Alistair Buxton a.j.buxton@gmail.com