use std::path::Path;
use crate::types::{BlameEntry, BranchInfo, DiffHunk, LogEntry, StashEntry, StatusEntry};
pub trait GitProvider: Send + Sync {
fn current_branch(&self, cwd: &Path) -> Option<String>;
fn branches(&self, cwd: &Path) -> Vec<BranchInfo>;
fn status(&self, cwd: &Path) -> Vec<StatusEntry>;
fn log(&self, cwd: &Path, query: &str, limit: usize) -> Vec<LogEntry>;
fn stash_list(&self, cwd: &Path) -> Vec<StashEntry>;
fn diff_hunks(&self, path: &Path) -> Vec<DiffHunk>;
fn blame(&self, _path: &Path) -> Vec<BlameEntry> {
vec![]
}
fn stage_file(&self, _path: &Path) -> bool {
false
}
fn reset_file(&self, _path: &Path) -> bool {
false
}
fn unstage_file(&self, _path: &Path) -> bool {
false
}
fn stage_lines(&self, _cwd: &Path, _patch: &str) -> bool {
false
}
fn reset_lines(&self, _cwd: &Path, _patch: &str) -> bool {
false
}
fn diff_content(&self, _path: &Path) -> Option<String> {
None
}
fn invalidate(&self, _path: &Path) {}
}