Skip to main content

staged_files

Function staged_files 

Source
pub async fn staged_files(
    root: &Path,
    wanted: fn(&Path) -> bool,
) -> Result<Vec<PathBuf>, GitError>
Expand description

Files staged for commit, relative to root, that drep analyzes.

--diff-filter=ACMR excludes deletions on purpose: a deleted file cannot be analyzed, and passing it on would look like an unreadable file rather than an absent one. The empty-tree fallback covers the initial-commit case (no HEAD yet).