2024-05-11 19:46:20 +01:00
|
|
|
use crate::BranchName;
|
|
|
|
|
|
|
|
/// Mapped from `.git-next.toml` file at `branches`
|
2024-05-15 07:55:05 +01:00
|
|
|
#[derive(
|
|
|
|
Clone, Debug, PartialEq, Eq, serde::Deserialize, derive_more::Constructor, derive_more::Display,
|
|
|
|
)]
|
2024-05-12 22:27:20 +01:00
|
|
|
#[display("{},{},{}", main, next, dev)]
|
2024-05-11 19:46:20 +01:00
|
|
|
pub struct RepoBranches {
|
2024-05-15 07:55:05 +01:00
|
|
|
main: String,
|
|
|
|
next: String,
|
|
|
|
dev: String,
|
2024-05-11 19:46:20 +01:00
|
|
|
}
|
|
|
|
impl RepoBranches {
|
|
|
|
pub fn main(&self) -> BranchName {
|
2024-05-12 22:27:20 +01:00
|
|
|
BranchName::new(&self.main)
|
2024-05-11 19:46:20 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
pub fn next(&self) -> BranchName {
|
2024-05-12 22:27:20 +01:00
|
|
|
BranchName::new(&self.next)
|
2024-05-11 19:46:20 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
pub fn dev(&self) -> BranchName {
|
2024-05-12 22:27:20 +01:00
|
|
|
BranchName::new(&self.dev)
|
2024-05-11 19:46:20 +01:00
|
|
|
}
|
|
|
|
}
|