Expand description
Git watching service for detecting git repository changes.
A reusable, configurable git watcher that monitors the .git directory
for changes and can be used to trigger updates only when git state changes.
§Example
use ratatui_toolkit::services::git_watcher::GitWatcher;
use std::path::Path;
// Create a watcher for a git repository
let mut watcher = GitWatcher::new().unwrap();
watcher.watch(Path::new("/path/to/repo")).unwrap();
// In your event loop:
if watcher.check_for_changes() {
println!("Git state changed!");
}Structs§
- GitWatch
Config - Configuration for the git watcher.
- GitWatcher
- A git watcher for detecting git repository state changes.