Skip to main content

Module git_watcher

Module git_watcher 

Source
Available on crate feature git-watcher only.
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 crate::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§

GitWatchConfig
Configuration for the git watcher.
GitWatcher
A git watcher for detecting git repository state changes.