Re: [PATCH] dir.c: fix dir re-inclusion rules with "NODIR" and "MUSTBEDIR"

2016-03-09 Thread Duy Nguyen
On Thu, Mar 10, 2016 at 12:55 AM, Junio C Hamano wrote: > Nguyễn Thái Ngọc Duy writes: > >> Side note, it's probably a bad idea to use basename matching on a >> negative rule (ie. no slashes in the pattern) because what the pattern >> says is "re-include

Re: [PATCH] dir.c: fix dir re-inclusion rules with "NODIR" and "MUSTBEDIR"

2016-03-09 Thread Junio C Hamano
Nguyễn Thái Ngọc Duy writes: > Side note, it's probably a bad idea to use basename matching on a > negative rule (ie. no slashes in the pattern) because what the pattern > says is "re-include _any_ directory named 'dir'", not just the directory > "dir" at right below this

[PATCH] dir.c: fix dir re-inclusion rules with "NODIR" and "MUSTBEDIR"

2016-03-09 Thread Nguyễn Thái Ngọc Duy
For NODIR case, the patterns look like this * # exclude dir, dir/file1 and dir/file2.. !dir # ..except that dir and everything inside is re-included.. dir/file2 # ..except (again!) that dir/file2 is excluded # ..which means dir/file1 stays included When