use std::path::Path;
use crate::services::repo_watcher::helpers::collect_git_changes;
use crate::services::repo_watcher::RepoWatcher;
impl RepoWatcher {
pub fn watch(&mut self, repo_path: &Path) -> Result<(), notify::Error> {
self.git_watcher.watch(repo_path)?;
self.file_watcher.watch(repo_path)?;
self.repo_path = Some(repo_path.to_path_buf());
self.change_set = collect_git_changes(repo_path, self.config.include_untracked);
self.has_pending_changes = true;
Ok(())
}
}