sara_core/diff/
options.rs1use std::path::PathBuf;
4
5#[derive(Debug, Clone)]
7pub struct DiffOptions {
8 pub ref1: String,
10 pub ref2: String,
12 pub repositories: Vec<PathBuf>,
14}
15
16impl DiffOptions {
17 pub fn new(ref1: impl Into<String>, ref2: impl Into<String>) -> Self {
19 Self {
20 ref1: ref1.into(),
21 ref2: ref2.into(),
22 repositories: Vec::new(),
23 }
24 }
25
26 pub fn with_repositories(mut self, repositories: Vec<PathBuf>) -> Self {
28 self.repositories = repositories;
29 self
30 }
31
32 pub fn add_repository(mut self, path: PathBuf) -> Self {
34 self.repositories.push(path);
35 self
36 }
37}