use std::path::PathBuf;
#[derive(Debug, Clone)]
pub struct DiffOptions {
pub ref1: String,
pub ref2: String,
pub repositories: Vec<PathBuf>,
pub stat: bool,
}
impl DiffOptions {
pub fn new(ref1: impl Into<String>, ref2: impl Into<String>) -> Self {
Self {
ref1: ref1.into(),
ref2: ref2.into(),
repositories: Vec::new(),
stat: false,
}
}
pub fn with_repositories(mut self, repositories: Vec<PathBuf>) -> Self {
self.repositories = repositories;
self
}
pub fn add_repository(mut self, path: PathBuf) -> Self {
self.repositories.push(path);
self
}
pub fn with_stat(mut self, stat: bool) -> Self {
self.stat = stat;
self
}
}