(params: &GitLogParams)
| 346 | } |
| 347 | |
| 348 | fn git_log_args(params: &GitLogParams) -> Vec<String> { |
| 349 | let mut args = vec![ |
| 350 | "log".to_string(), |
| 351 | format!("--max-count={}", params.max_count.unwrap_or(50)), |
| 352 | "--format=%H%x09%h%x09%an%x09%ae%x09%ci%x09%s".to_string(), |
| 353 | ]; |
| 354 | if let Some(skip) = params.skip { |
| 355 | args.push(format!("--skip={skip}")); |
| 356 | } |
| 357 | if let Some(author) = params.author.as_deref().filter(|s| !s.trim().is_empty()) { |
| 358 | args.push(format!("--author={author}")); |
| 359 | } |
| 360 | if let Some(grep) = params.grep.as_deref().filter(|s| !s.trim().is_empty()) { |
| 361 | args.push(format!("--grep={grep}")); |
| 362 | } |
| 363 | if let Some(since) = params.since.as_deref().filter(|s| !s.trim().is_empty()) { |
| 364 | args.push(format!("--since={since}")); |
| 365 | } |
| 366 | if let Some(until) = params.until.as_deref().filter(|s| !s.trim().is_empty()) { |
| 367 | args.push(format!("--until={until}")); |
| 368 | } |
| 369 | args |
| 370 | } |
| 371 | |
| 372 | #[derive(Debug, Deserialize)] |
| 373 | #[serde(rename_all = "camelCase")] |
no test coverage detected