1use std::path::Path;
2
3use termesh_core::{
4 GitBranch, GitDiffTarget, GitFileDiff, GitOperation, GitRepositorySnapshot, GitResult,
5};
6
7pub trait GitService: Send + 'static {
9 fn snapshot(&mut self, root: &Path) -> GitResult<GitRepositorySnapshot>;
10 fn diff(&mut self, root: &Path, path: &Path, target: GitDiffTarget) -> GitResult<GitFileDiff>;
11 fn branches(&mut self, root: &Path) -> GitResult<Vec<GitBranch>>;
12 fn execute(&mut self, root: &Path, operation: &GitOperation) -> GitResult<String>;
13}