use std::path::PathBuf;
use thiserror::Error;
#[derive(Debug, Error)]
pub enum GitCortexError {
#[error("parse error in {file}: {message}")]
Parse { file: PathBuf, message: String },
#[error("git error: {0}")]
Git(String),
#[error("store error: {0}")]
Store(String),
#[error("io error: {0}")]
Io(#[from] std::io::Error),
#[error("branch '{branch}' not found in store")]
BranchNotFound { branch: String },
#[error("config error: {0}")]
Config(String),
}
pub type Result<T> = std::result::Result<T, GitCortexError>;