use std::time::SystemTime;
use anyhow::Result;
use crate::types::{BlameEntry, BranchInfo, CommitId, CommitInfo, DiffSummary, SortOrder, StashEntry, StatusDigest, SubmoduleInfo, TagInfo, WorktreeStatus};
pub trait VcsBackend: Send + Sync {
fn status_digest(&self) -> Result<StatusDigest>;
fn local_branches(&self) -> Result<Vec<BranchInfo>>;
fn remote_branches(&self) -> Result<Vec<BranchInfo>>;
fn list_commits(&self) -> Result<Vec<CommitInfo>>;
fn list_commits_sorted(&self, order: SortOrder) -> Result<Vec<CommitInfo>>;
fn log_since(&self, since: SystemTime, until: SystemTime) -> Result<Vec<CommitInfo>>;
fn find_commit(&self, id: &CommitId) -> Result<CommitInfo>;
fn list_tags(&self) -> Result<Vec<TagInfo>>;
fn list_tags_sorted(&self, order: SortOrder) -> Result<Vec<TagInfo>>;
fn create_tag(&self, name: &str) -> Result<()>;
fn create_annotated_tag(&self, name: &str, message: &str) -> Result<()>;
fn delete_tag(&self, name: &str) -> Result<()>;
fn diff(&self, from: &CommitId, to: &CommitId) -> Result<DiffSummary>;
fn remote_url(&self, name: &str) -> Option<String>;
fn is_dirty(&self) -> Result<bool>;
fn merge_base(&self, a: &CommitId, b: &CommitId) -> Result<Option<CommitId>>;
fn is_ancestor(&self, candidate: &CommitId, descendant: &CommitId) -> Result<bool>;
fn blame(&self, path: &std::path::Path) -> Result<Vec<BlameEntry>>;
fn worktree_status(&self) -> Result<WorktreeStatus>;
fn file_at_commit(&self, path: &std::path::Path, commit_id: &CommitId) -> Result<Vec<u8>>;
fn submodules(&self) -> Result<Vec<SubmoduleInfo>>;
fn stash_entries(&self) -> Result<Vec<StashEntry>>;
}