MCPcopy Create free account
hub / github.com/GCWing/BitFun / git_log_args

Function git_log_args

src/apps/desktop/src/api/git_api.rs:348–370  ·  view source on GitHub ↗
(params: &GitLogParams)

Source from the content-addressed store, hash-verified

346}
347
348fn 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")]

Callers 1

git_get_commitsFunction · 0.85

Calls 3

trimMethod · 0.80
pushMethod · 0.45
is_emptyMethod · 0.45

Tested by

no test coverage detected