use git_next_config::BranchName; use crate::Commit; #[derive(Clone, Debug, Hash, PartialEq, Eq)] pub struct GitRef(pub String); impl From for GitRef { fn from(value: Commit) -> Self { Self(value.sha().to_string()) } } impl From for GitRef { fn from(value: BranchName) -> Self { Self(value.0) } } impl std::fmt::Display for GitRef { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { write!(f, "{}", self.0) } }