facebook / facebook/watchman

make query and subscribe work with subdirectory of watched root

Open
#599 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
13.7k
Forks
1.1k
PR merge metrics
No merged PRs in 30d

Description

Passing the absolute path of a subdirectory to `query` or `subscribe` (in place of a watched root) should work seamlessly.

Here's what would happen. When validating whether the path is a watched root, look at each ancestor until a watched root is found. If the path is not watched but an ancestor is, convert the given path to a `relative_root`. If a `relative_root` was also passed, prepend the converted path to the front of the existing `relative_root`.

This would let clients avoid calling `watch-list` just to find out which ancestor is the valid root. That can be done on Watchman's end.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.