git_next_core/git/git_ref.rs
//
use crate::{newtype, s};
use derive_more::Display;
use crate::git::{commit::Sha, Commit};
newtype!(GitRef, String, Display, "A git reference to a git commit.");
impl From<Commit> for GitRef {
fn from(value: Commit) -> Self {
Self(s!(value.sha()))
}
}
impl From<Sha> for GitRef {
fn from(value: Sha) -> Self {
Self(s!(value))
}
}