use crate as git; use git_next_config::BranchName; pub type Result = core::result::Result; pub struct Positions { pub main: git::Commit, pub next: git::Commit, pub dev: git::Commit, pub dev_commit_history: Vec, } #[derive(Debug, derive_more::Display)] pub enum Error { Fetch(git::fetch::Error), CommitLog(git::commit::log::Error), #[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 {} impl From for Error { fn from(value: git::fetch::Error) -> Self { Self::Fetch(value) } }