Skip to main content

diff_index

Function diff_index 

Source
pub fn diff_index(
    cwd: &Path,
    refname: &str,
    cached: bool,
) -> Result<Vec<DiffEntry>, Error>
Expand description

Run git diff-index -z [--cached] <ref> and return the parsed entries.

cached = true reports staged changes (HEAD vs index); cached = false reports working-tree changes (HEAD vs working tree, including unstaged).