use thiserror::Error;
#[derive(Debug, Error)]
pub enum GitError {
#[error("Not a git repository: {0}")]
NotARepo(String),
#[error("Git error: {0}")]
Git(#[from] git2::Error),
#[error("Reference error: {0}")]
Reference(String),
#[error("Object error: {0}")]
Object(String),
#[error("Watch error: {0}")]
Watch(#[from] notify::Error),
#[error("IO error: {0}")]
Io(#[from] std::io::Error),
}
pub type Result<T> = std::result::Result<T, GitError>;