Skip to main content

auto_git_add

Function auto_git_add 

Source
pub fn auto_git_add(root: &Path, paths: &[&str])
Expand description

Stage the given paths if auto-git >= Add. Paths are relative to the project root. Errors are printed as warnings and swallowed.

Paths that match .gitignore are silently skipped before git add runs. Without that filter an accidental write to an ignored path – or a stale index entry that survived an earlier ordering bug – would either pollute the index or print git’s “paths are ignored” warning on every subsequent run.