Skip to main content

spawn_git_watcher

Function spawn_git_watcher 

Source
pub fn spawn_git_watcher<F>(git_dir: PathBuf, on_change: F) -> JoinHandle<()>
where F: Fn() -> bool + Send + 'static,
Expand description

Spawn a background thread that watches git_dir for changes and calls on_change after each debounced burst.

Uses a 60-second fallback poll so that the UI eventually reflects external changes even on network file systems. Use [spawn_git_watcher_with_fallback] when a custom fallback interval is needed (e.g. in tests).