git-next/crates/git/src/fetch.rs
Paul Campbell 588666ffe1
All checks were successful
Rust / build (push) Successful in 2m22s
ci/woodpecker/push/cron-docker-builder Pipeline was successful
ci/woodpecker/push/push-next Pipeline was successful
ci/woodpecker/push/tag-created Pipeline was successful
tests: add more tests to git crate
2024-06-13 19:50:19 +01:00

31 lines
606 B
Rust

//
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,
#[cfg(test)]
#[error("expected failure in test")]
TestFailureExpected,
#[cfg(test)]
#[error("test")]
TestResult(#[from] Box<dyn std::error::Error>),
}