-
-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Find out which paths to watch #78
Comments
I don't exactly understand your problem |
I would like to know, for a given path, if all possible subpaths are ignored, or not. In other words, is there a matching regex that ignores the path and no unignore regexes that match subpaths? This knowledge is useful for monitoring a git workdir on Linux for changes. You can't get filesystem events for subtrees so you must recurse, and if a subtree is fully ignored you don't need to recurse into it. |
From gitignore spec And I suggest to get better understanding about the usage of .gitignore file |
Will not work expectedly, coz Change it to
|
to set up recursive watchers of paths, it would be a good optimization to skip watching paths if there are no unignored files under them.
Ideally,
filter()
would return askip
parameter like node-watch uses: https://github.com/yuanchuan/node-watch/blob/master/README.md#:~:text=skip%20ignored%20directories%20by%20returning%20the%20skip%20flagThen we'd also need a list of directories that are unignored under ignored directories, so that they can be watched separately.
so e.g.
would return
skip
on all paths under root except for"foo"
and"uhm"
, and it would have a list of also-to-watch['/bar/hello']
.All this is assuming that directories are correctly marked with a trailing
/
; if not they would be considered as files and this would be a safe fallback to recursing.The text was updated successfully, but these errors were encountered: