Get the output format based on command flags.
(&self)
| 223 | |
| 224 | /// Get the output format based on command flags. |
| 225 | pub fn get_format(&self) -> DiffFormat { |
| 226 | if self.name_only { |
| 227 | DiffFormat::NameOnly |
| 228 | } else if self.name_status || self.short { |
| 229 | DiffFormat::NameStatus |
| 230 | } else if self.stat { |
| 231 | DiffFormat::Stat |
| 232 | } else { |
| 233 | DiffFormat::Unified |
| 234 | } |
| 235 | } |
| 236 | |
| 237 | /// Parse the algorithm string into an Algorithm enum. |
| 238 | pub(crate) fn parse_algorithm(&self) -> CliResult<Algorithm> { |