Paul Campbell
f4b8401bb1
Some checks failed
ci/woodpecker/cron/cron-docker-builder Pipeline was successful
ci/woodpecker/cron/push-next Pipeline was successful
ci/woodpecker/cron/tag-created Pipeline was successful
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
Rust / build (push) Has been cancelled
26 lines
600 B
Rust
26 lines
600 B
Rust
use super::GitRef;
|
|
|
|
#[derive(Debug)]
|
|
pub enum Force {
|
|
No,
|
|
From(GitRef),
|
|
}
|
|
impl std::fmt::Display for Force {
|
|
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
|
match self {
|
|
Self::No => write!(f, "fast-forward"),
|
|
Self::From(from) => write!(f, "force-if-from:{}", from),
|
|
}
|
|
}
|
|
}
|
|
|
|
#[derive(Debug, derive_more::From, derive_more::Display)]
|
|
pub enum Error {
|
|
Open(Box<gix::open::Error>),
|
|
Fetch(super::fetch::Error),
|
|
Push,
|
|
Lock,
|
|
}
|
|
impl std::error::Error for Error {}
|
|
|
|
pub type Result = core::result::Result<(), Error>;
|