2024-05-15 08:29:41 +01:00
|
|
|
#[derive(Clone, Debug, PartialEq, Eq, derive_more::Constructor, derive_more::Display)]
|
2024-05-14 16:28:17 +01:00
|
|
|
#[display("{}", sha)]
|
2024-05-11 19:46:20 +01:00
|
|
|
pub struct Commit {
|
|
|
|
sha: Sha,
|
|
|
|
message: Message,
|
|
|
|
}
|
|
|
|
impl Commit {
|
|
|
|
pub const fn sha(&self) -> &Sha {
|
|
|
|
&self.sha
|
|
|
|
}
|
|
|
|
pub const fn message(&self) -> &Message {
|
|
|
|
&self.message
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-05-15 08:29:41 +01:00
|
|
|
#[derive(Clone, Debug, PartialEq, Eq, derive_more::Constructor, derive_more::Display)]
|
2024-05-11 19:46:20 +01:00
|
|
|
pub struct Sha(String);
|
|
|
|
|
2024-05-15 08:29:41 +01:00
|
|
|
#[derive(Clone, Debug, PartialEq, Eq, derive_more::Constructor, derive_more::Display)]
|
2024-05-11 19:46:20 +01:00
|
|
|
pub struct Message(String);
|
2024-05-23 08:30:58 +01:00
|
|
|
|
|
|
|
#[derive(Debug)]
|
|
|
|
pub enum Status {
|
|
|
|
Pass,
|
|
|
|
Fail,
|
|
|
|
Pending,
|
|
|
|
}
|
|
|
|
|
|
|
|
#[derive(Clone, Debug)]
|
|
|
|
pub struct Histories {
|
|
|
|
pub main: Vec<Commit>,
|
|
|
|
pub next: Vec<Commit>,
|
|
|
|
pub dev: Vec<Commit>,
|
|
|
|
}
|
2024-05-24 08:47:34 +01:00
|
|
|
|
|
|
|
pub mod log {
|
|
|
|
use derive_more::{Display, From};
|
|
|
|
|
|
|
|
#[derive(Debug, Display, From)]
|
|
|
|
pub enum Error {
|
|
|
|
Gix(String),
|
|
|
|
Lock,
|
|
|
|
}
|
|
|
|
impl std::error::Error for Error {}
|
|
|
|
}
|