Skip to main content

start_change_watch

Function start_change_watch 

Source
pub fn start_change_watch(
    root: PathBuf,
    respect_gitignore: bool,
) -> (Receiver<()>, CancelToken)
Expand description

Spawn a recursive watch rooted at root that reports ONE message per burst of changes the tree saw.

The same notify wiring, burst drain and ignore filter the index watch above uses, without its per-path classification: a caller that only needs to know the tree moved should not pay for the walk a created directory costs the index. Paths under .git are ignored by the filter, so a commit or a stage fires nothing at all - those ride the caller’s own cadence.