From: Junio C Hamano Date: Fri, 05 Jun 2020 00:56:37 GMT Subject: Re: Possible regression for sparse-checkout in git 2.27.0 Message-ID: In-Reply-To: <0aab7056-7176-01bc-ca7b-01356cbace4c@gmail.com> Derrick Stolee writes: > The first is due to the .gitignore syntax. The syntax allows exact > matches for _directories_ using a trailing slash "/". For example, > we can match everything in A/B/C with the pattern > > A/B/C/ > > This would match the files in A/B/C/ and its subdirectories, but will > not match a file A/B/C.txt or A/B/C1/. There is no equivalent matching > for files, so A/B/C _will_ match a file A/B/C and A/B/C.txt. Whether this > matters to you or not depends on your file structure. The pattern A/B/C _will_ match a file A/B/C and a directory A/B/C/, but I do not think it matches a file A/B/C.txt (or a path with any other suffix). I suspect that for the purpose of your explanation, the pattern A/B/C does not have to match A/B/C.txt to cause trouble; the fact that it matches directory A/B/C would be sufficient, I guess.