On 22.11.2023 09:57, Juergen Gross wrote:
> On 22.11.23 09:39, Jan Beulich wrote:
>> On 22.11.2023 09:31, Juergen Gross wrote:
>>> --- /dev/null
>>> +++ b/tools/python/.gitignore
>>> @@ -0,0 +1,4 @@
>>> +build/*
>>
>> Are this and just build/ actually equivalent? Looking at our top-level
>> .gitignore, I see e.g. extras/ and install/*, which I would expect want
>> both treating the same? The form with a wildcard, to me at least,
>> doesn't obviously include the directory itself ...
> 
> The .gitignore specification [1] suggests that we should use build/ (same for
> the new entry), as otherwise entries in subdirectories would not match.

The description there of what a trailing slash means isn't really clear.
Nothing is said about anything underneath the specified directory. Also
nothing is said about what a trailing /* means towards the named directory.

What _is_ said is that all the new entries here should start with a slash,
to avoid matching similarly named subdirectories further into tools/python/.
Unless I misunderstand the intention of this .gitignore entry and the goal
is to match anywhere in the subtree.

Jan

Reply via email to