use notify::Watcher;
use std::path::Path;
use crate::services::git_watcher::GitWatcher;
impl GitWatcher {
pub fn unwatch(&mut self, repo_path: &Path) -> Result<(), notify::Error> {
let git_dir = repo_path.join(".git");
self.watcher.unwatch(&git_dir)?;
self.repo_path = None;
self.has_pending_changes = false;
Ok(())
}
}