Skip to main content

changed_files

Function changed_files 

Source
pub fn changed_files(
    dir: &Path,
    base: Option<&str>,
) -> Result<Vec<PathBuf>, GitError>
Expand description

Files added, modified, copied or renamed relative to base (or to HEAD when base is None, covering both staged and unstaged changes).

Paths are returned absolute, sorted and deduplicated. Deleted files are excluded; renamed files appear under their new name. Untracked files are not included: they are neither staged nor tracked, so git diff does not see them.