git-next/crates/core/src/git/git_ref.rs
Paul Campbell 8c19680056
Some checks failed
Rust / build (push) Successful in 1m15s
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
Release Please / Release-plz (push) Failing after 10m22s
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
refactor: macros use a more common syntax
Parameters were separated by ':', but are now separated by ','.
2024-08-06 20:06:39 +01:00

18 lines
378 B
Rust

//
use crate::newtype;
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(value.sha().to_string())
}
}
impl From<Sha> for GitRef {
fn from(value: Sha) -> Self {
Self(value.to_string())
}
}