Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Config ignore/only negation not quite working properly #6907
I introduced negation thinking I had a working solution, but kind of questioning if that's actually the case or not :P
In the current implementation, I wanted to handle folder-level ignore/only, so you could for instance do
and to handle that I basically generated the possible folders from the filename, so if you have
it would test
thereby checking if the patter matched any of the possible parents of the file.
The issue arises with negation introduced, for cases like the following
will match, but things like
will still see
I haven't had time to think through a good solution, but I figured I'd file it so it is tracked somewhere. Maybe this is solvable by checking which items in the file/folder name list got matched?
Is it possible to avoid descending into ignored directories in the first place, thus removing the need for negation? I've just found that duplicate config files in an ignored folder will cause 7.0.0-beta.40 to throw an exception so avoiding scanning the ignored directory in the altogether would possibly fix that.
edit: I've just realised that it's probably still necessary to perform the check for cases where a user does something like the following