Expand description
§use-git-ignore
Primitive gitignore pattern vocabulary for RustUse.
use-git-ignore classifies gitignore-style lines as blank lines, comments, negated patterns, directory patterns, or ordinary patterns. It does not decide whether a filesystem path is ignored.
§Basic usage
use use_git_ignore::{GitIgnoreNegation, GitIgnoreRule};
let rule = GitIgnoreRule::parse("!target/").expect("valid ignore rule");
assert_eq!(rule.negation(), GitIgnoreNegation::Negated);
assert!(rule.is_directory_only());§Scope
- Classify pattern text, comments, blank lines, negation, and directory markers.
- Keep filesystem walking and ignore matching out of scope.
Structs§
- GitIgnore
Pattern - A non-empty ignore pattern.
- GitIgnore
Rule - A classified ignore rule.
Enums§
- GitIgnore
Negation - Pattern negation vocabulary.
- GitIgnore
Parse Error - Error returned while parsing ignore vocabulary.
- GitIgnore
Scope - Ignore rule classification.