Re: [BUG] ls-files '**' globstar matches one or more directories instead of zero or more directories

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Apr 15, 2017 at 2:17 AM, Alistair Buxton <a.j.buxton@xxxxxxxxx> wrote:
> 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.

Another data point. t3070-wildmatch.sh has a test for this case

match 1 0 'foo' '**/foo'

so the pattern matching machinery is _not_ broken. There may be some
changes in ls-files (pathspec-related?) that leads to this. But I
didn't try to bisect it.
-- 
Duy



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]