pub async fn git_diff(
repo: &Path,
path: Option<&str>,
staged: bool,
) -> Result<String, GitError>Expand description
Return a unified diff for the repository or a specific file.
staged = trueproducesgit diff --cached(index vs HEAD).staged = falseproducesgit diff(working tree vs index).pathrestricts the diff to a single file.