On IRC someone pointed me to the glossary section for pathspec, and I
find that even more confusing.
In the section about ":(glob)" it says:
> For example, "**/foo" matches file or directory "foo" anywhere, the same as
> pattern "foo".
This is not true for ls-files: ":(glob)**/.gitignore" is co
On 16 April 2017 at 12:25, Duy Nguyen wrote:
> git ls-files ':(glob)**/*'
>
> Without that '**' is a normal '*' and matching just subdirs is expected.
But '*/' should match exactly one subdirectory deep. Instead it
matches one more more subdirectories.
Meaning it behaves the way '**/*/' should.
On Sat, Apr 15, 2017 at 2:17 AM, Alistair Buxton wrote:
> To reproduce, go to any git repository and run:
>
> diff <(git ls-files '**/*' | sort) <(git ls-files | sort)
Actually the '**/' magic only kicks in if you write
git ls-files ':(glob)**/*'
Without that '**' is a normal '*' and matchi
On Sat, Apr 15, 2017 at 2:17 AM, Alistair Buxton 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
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 '**/Makefi
5 matches
Mail list logo