git-next/crates/git/src/fetch.rs

32 lines
606 B
Rust
Raw Normal View History

2024-06-09 10:21:09 +01:00
//
pub type Result<T> = core::result::Result<T, Error>;
#[derive(Debug, thiserror::Error)]
pub enum Error {
#[error("unable to open repo: {0}")]
UnableToOpenRepo(String),
#[error("no remote found")]
NoFetchRemoteFound,
#[error("remote connect: {0}")]
Connect(String),
#[error("prepare: {0}")]
Prepare(String),
#[error("receive: {0}")]
Receive(String),
#[error("lock")]
Lock,
2024-06-09 10:21:09 +01:00
#[cfg(test)]
#[error("expected failure in test")]
TestFailureExpected,
#[cfg(test)]
#[error("test")]
TestResult(#[from] Box<dyn std::error::Error>),
}