MCPcopy Index your code
hub / github.com/AI45Lab/Code / get_diff

Function get_diff

core/src/git.rs:619–628  ·  view source on GitHub ↗

Get diff output.

(repo_path: &Path, target: Option<&str>)

Source from the content-addressed store, hash-verified

617
618/// Get diff output.
619pub fn get_diff(repo_path: &Path, target: Option<&str>) -> Result<String> {
620 let args: Vec<&str> = if let Some(t) = target {
621 vec!["diff", t]
622 } else {
623 vec!["diff", "--stat"]
624 };
625
626 let (_, stdout, _) = run_git(repo_path, &args)?;
627 Ok(stdout)
628}
629
630/// Stash information.
631#[derive(Debug, Clone)]

Callers 1

diffMethod · 0.85

Calls 1

run_gitFunction · 0.85

Tested by

no test coverage detected