26 lines
658 B
Rust
26 lines
658 B
Rust
|
use crate as git;
|
||
|
use git_next_config::BranchName;
|
||
|
|
||
|
pub type Result = core::result::Result<Positions, Error>;
|
||
|
|
||
|
pub struct Positions {
|
||
|
pub main: git::Commit,
|
||
|
pub next: git::Commit,
|
||
|
pub dev: git::Commit,
|
||
|
pub dev_commit_history: Vec<git::Commit>,
|
||
|
}
|
||
|
|
||
|
#[derive(Debug, derive_more::Display)]
|
||
|
pub enum Error {
|
||
|
Network(Box<kxio::network::NetworkError>),
|
||
|
#[display("Failed to Reset Branch {branch} to {commit}")]
|
||
|
FailedToResetBranch {
|
||
|
branch: BranchName,
|
||
|
commit: git::Commit,
|
||
|
},
|
||
|
BranchReset(BranchName),
|
||
|
BranchHasNoCommits(BranchName),
|
||
|
DevBranchNotBasedOn(BranchName),
|
||
|
}
|
||
|
impl std::error::Error for Error {}
|