Re: [PATCH v4 04/13] dir: fix pattern matching on dirs
- From
Derrick Stolee <stolee@gmail.com>
- Date
- Nov 2, 2021, 13:42 UTC
- Message-ID
- <2f1d2e09-faf5-0caf-6be8-7bcede9fe8d1@gmail.com>
- In-Reply-To
- <xmqq7ddr9z0i.fsf@gitster.g>
On 11/1/2021 8:34 PM, Junio C Hamano wrote:
> Glen Choo <chooglen@google.com> writes: > >> This patch changes the behavior of .gitignore such that directories are >> now matched by prefix instead of matching exactly.
Thank you for pointing out an unintended consequence.
Show 13 quoted lines
>> The failure that we observed is something like the following: >> >> In "a/.gitignore", we have the pattern "git/". We should expect that >> "a/git/foo" to be ignored because "git/" should be matched exactly. >> However, "a/git-foo/bar" is also ignored because "git-foo" matches the >> prefix. >> >> I'll prepare a test case for this as soon as I figure out how to write >> it.. > > FWIW, reverting this commit (and nothing else) from 'master' does not > seem to break any test. That does not necessarily mean much (it may > be indicating a gap in the test coverage).
Hm. I definitely seemed confident in my commit message that this change was important for a test I was introducing at some point. Let me revert it in microsoft/git and see if our Scalar functional tests find an issue.
In the meantime, I'll try to create a Git test that demonstrates a problem one way or another.
Thanks, -Stolee