use std::path::PathBuf; /// Anything that can go wrong reading a repository. /// /// The `gix` error enums are large, so they are boxed: an unboxed variant would /// make every `Result` in the crate pay for the biggest error case. #[derive(Debug, thiserror::Error)] pub enum Error { #[error("no git repository found at or above {}", .path.display())] Discover { path: PathBuf, #[source] source: Box, }, #[error("could not open the git repository at {}", .path.display())] Open { path: PathBuf, #[source] source: Box, }, #[error("could not read HEAD")] Head(#[source] Box), #[error("could not list references")] References(#[source] Box), #[error("could not walk the commit graph")] Graph(#[source] Box), }