1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
//
use crate as git;
use derive_more::Display;
use git_next_config::newtype;

use crate::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<git::commit::Sha> for GitRef {
    fn from(value: git::commit::Sha) -> Self {
        Self(value.to_string())
    }
}